Diego
05710bc9a7
add initial logging
2024-08-14 15:46:41 +02:00
Tanguy
e04a515599
Add remoteAddress and localAddress ( #40 )
2023-01-17 18:06:36 +01:00
Tanguy
9dd9b528cf
Switch to results.Opt ( #38 )
...
* Give more time for CI
Lastest Nim release takes too long to build
2022-09-28 16:21:25 +02:00
Tanguy
084413c986
Remove asynctest ( #36 )
2022-08-25 14:37:35 +02:00
Tanguy
7e432aeb5c
Remove Questionable ( #35 )
2022-08-25 13:19:27 +02:00
Tanguy
e48bc4547f
Fix helpers.contains for Nim > 1.4 ( #34 )
2022-06-20 15:20:47 +02:00
Tanguy
3f36babc4f
Allow chronos strictExceptions ( #33 )
...
* Allow chronos strictExceptions
* Disable stable on CI
2022-06-17 18:41:06 +02:00
Mark Spanbroek
626d18dec8
Close streams when the underlying connection is closed.
2021-09-21 15:10:03 +02:00
Mark Spanbroek
1f6b840ebf
Drop connection when underlying UDP transport fails
2021-08-03 11:13:16 +02:00
Mark Spanbroek
0d9eb9edc5
Adds bi-directional streams
...
These are now the default when opening a stream.
2021-07-13 08:57:07 +02:00
Mark Spanbroek
334043fccc
Check that errors are raised when underlying connection has closed
2021-06-16 10:53:18 +02:00
Mark Spanbroek
9375399a39
Introduce QuicException and QuicDefect base classes
2021-06-16 10:53:18 +02:00
Mark Spanbroek
6401528bf6
Expose parseDatagram at the transport level
...
So that listener doesn't have to import
native code directly.
2021-06-16 10:53:18 +02:00
Mark Spanbroek
b7591ee8c6
Code that uses ngtcp2 library is moved into `native` folder
2021-06-16 10:53:18 +02:00
Mark Spanbroek
e88961e336
Replace nil pointers with optionals
2021-06-16 10:53:18 +02:00
Mark Spanbroek
087be3a1b9
Limit size of stream queue
...
Writing to streams is blocked when the maximum stream offset
is reached. Previously we extended this offset when data was
*added* to the read queue of the receiving peer. Now we only
extend it once data has been *removed* from the queue,
thereby limiting the queue size.
2021-01-21 17:21:25 +01:00
Mark Spanbroek
867a01a2eb
Add draining state for streams
...
So that you can read the last bytes from a stream
that was closed by the peer.
2021-01-21 17:13:37 +01:00
Mark Spanbroek
bd261033e7
Switch to closed state when peer closes stream
2021-01-21 17:13:37 +01:00
Mark Spanbroek
9e755eb65f
Simplify tests using setup and teardown
2021-01-13 09:03:18 +01:00
Mark Spanbroek
df709d277f
Use package asynctest
2021-01-13 09:03:18 +01:00
Mark Spanbroek
fce5c31622
Introduce Connection.waitClosed()
...
It waits for the peer to close the connection.
2021-01-04 10:05:34 +01:00
Mark Spanbroek
a837f4f87d
Remove close event on QuicConnection
2021-01-04 10:05:34 +01:00
Mark Spanbroek
15e3c4cf1c
New state for quic connection: disconnecting
...
When a quic connection is disconnecting, close the
send loop and the incoming udp connection.
2021-01-04 10:05:34 +01:00
Mark Spanbroek
2aee8ff51e
Ensure that all ids of a connection are removed
2021-01-04 10:05:34 +01:00
Mark Spanbroek
3ec35363a1
Remove duplication between quicclient and quicserver
2021-01-04 10:05:34 +01:00
Mark Spanbroek
b156e2c8f7
QuicConnection fires event when closed
2021-01-04 10:05:34 +01:00
Mark Spanbroek
2161c3b769
Combine testNgtcp2Connection & testQuicConnection
2021-01-04 10:05:34 +01:00
Mark Spanbroek
e4842f9433
Run tests against QuicConnection, instead of Ngtcp2Connection
2021-01-04 10:05:34 +01:00
Mark Spanbroek
4d226f7906
Add unit test for example in Readme
2021-01-04 10:05:34 +01:00
Mark Spanbroek
1ba8606a7b
Add allSucceeded() to async test helper.
2021-01-04 10:05:34 +01:00
Mark Spanbroek
8d5fb399a2
Add tests for connection in closed state
2021-01-04 10:05:34 +01:00
Mark Spanbroek
2596b65352
Rename tests to better describe the current situation
2021-01-04 10:05:34 +01:00
Mark Spanbroek
376c359a5f
Rename ngtcp2 connection constructors
...
newClientConnection -> newNgtcp2Client
newServerConnection -> newNgtcp2Server
2021-01-04 10:05:34 +01:00
Mark Spanbroek
012d4dafcd
Separate udp, transport and helper folders
2021-01-04 10:05:34 +01:00
Mark Spanbroek
a50a987542
Introduce state pattern for Streams
...
Streams can now be in one of two states: open or closed.
Separates a Stream from its ngtcp2 implementation specifics.
Breaks the circular dependency between Connection and Stream,
allowing them to be defined in separate modules.
2021-01-04 10:05:34 +01:00
Mark Spanbroek
4c005eee37
Rename: Connection.close() -> Connection.drop()
2021-01-04 10:05:34 +01:00
Mark Spanbroek
e9248dce75
Api for reading from and writing to streams
2021-01-04 10:05:34 +01:00
Mark Spanbroek
226198b544
Remove ids from listener when closing connection
2021-01-04 10:05:34 +01:00
Mark Spanbroek
206117ab40
Move most of the logic from api into listener and connection
...
Ensures that the internals of listener and connection are hidden.
2021-01-04 10:05:34 +01:00
Mark Spanbroek
3b9dfbd544
Ensure that all connections are closed in listener test
2021-01-04 10:05:34 +01:00
Mark Spanbroek
db54516c0f
Formatting
2021-01-04 10:05:34 +01:00
Mark Spanbroek
124ac8152f
Listener only creates new connection for unknown connection id
2021-01-04 10:05:34 +01:00
Mark Spanbroek
49350432af
Add test for listener
2021-01-04 10:05:34 +01:00
Mark Spanbroek
389357b5d1
Add test helper for sending udp datagrams
2021-01-04 10:05:34 +01:00
Mark Spanbroek
58516598ab
Add async test helper for callback functions
2021-01-04 10:05:34 +01:00
Mark Spanbroek
7ab0ecbaf8
Accept multiple incoming connections
...
Introduces table to keep track of connection ids.
2021-01-04 10:05:34 +01:00
Mark Spanbroek
56586c7573
Add Ngtcp2Connection.ids
2021-01-04 10:05:34 +01:00
Mark Spanbroek
5bd7476fb8
Rename: testConnection -> testApi
2021-01-04 10:05:34 +01:00
Mark Spanbroek
a5eb222c98
Remove everything but the API from the main module
2021-01-04 10:05:34 +01:00
Mark Spanbroek
de1952a234
Move API and Listener into separate modules
2021-01-04 10:05:34 +01:00