Commit Graph

369 Commits

Author SHA1 Message Date
Tanguy dbd8401fd0
Remove asynctest 2022-08-25 13:30:25 +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 31cd1d5839 Check that options have value before using them 2021-08-31 11:36:30 +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 dcf80a524b Update asynctest to 0.3.0 2021-07-07 11:02:19 +02:00
Mark Spanbroek 8edba5e448 Combine common imports into "basics" module 2021-06-16 10:53:18 +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 88af9b568e Move errorAsDefect macro to errors module 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 e24a9cb169 Check that conn pointer is available before use 2021-06-16 10:53:18 +02:00
Mark Spanbroek fe46e177cc No longer reach into Ngtcp2Connection object to get ngtc2_conn pointer 2021-06-16 10:53:18 +02:00
Mark Spanbroek 84f080b75b Knowledge about ngtcp2 is moved down into the state machine 2021-06-16 10:53:18 +02:00
Mark Spanbroek 49016fff3c Set ngtcp2 callbacks when entering open connection state 2021-06-16 10:53:18 +02:00
Mark Spanbroek e411151cac Set id callbacks when entering open connection state 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 ca976f74ed Cleanup 2021-06-16 10:53:18 +02:00
Mark Spanbroek 60e42c9f23 Cleanup 2021-06-16 10:53:18 +02:00
Mark Spanbroek d7d8dd846d Nim 1.4.8 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 28b1f26b8e Remove linting (not used) 2021-05-31 10:01:36 +02:00
Mark Spanbroek a793f91130 Prevent double CI runs for every pull request
Only run CI on push to main and on PRs. Non-PR branches
can be manually dispatched through the Github Actions UI.
2021-05-31 10:01:36 +02:00
Mark Spanbroek f63c959f4d Use nimcrypto instead of sysrandom
The sysrandom package fails on 32 bit windows.
2021-05-27 16:40:55 +02:00
Mark Spanbroek 8fa017b492 Use nim 1.4.6 by default in local environment
If you're using the ASDF version manager.
2021-05-27 16:40:55 +02:00
Mark Spanbroek d5766001d8 Run CI for both Nim 1.2.6 and latest 2021-05-27 16:40:55 +02:00
Mark Spanbroek 8f1010d413 Remove workaround in CI
No longer required.
2021-05-27 16:40:55 +02:00
Mark Spanbroek a4a802b97d Workaround for CI failure on Windows 2021-04-06 09:40:01 +02:00
Mark Spanbroek bf524cf70f Handle errors in timeouts
As required by latest version of Chronos.
Uses `upraises` for exception tracking across Nim 1.2 and 1.4.
Fixes Ngtcp2 error hierarchy to match that of Nim.
2021-04-06 09:40:01 +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 5bb0afe175 Fix GCUnsafe2 warning 2021-01-13 09:03:35 +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 00349df9c0 Enforce that connection and stream states cannot be entered more than once 2021-01-04 10:05:34 +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 78f48d9986 Switch to draining state when ngtcp2 indicates it 2021-01-04 10:05:34 +01:00
Mark Spanbroek f9da860c9d Send close datagram when entering closing state 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 e9d44eadb6 Split DrainingConnection and ClosingConnection 2021-01-04 10:05:34 +01:00
Mark Spanbroek 34b88261f4 Rename: DrainingConnection -> ClosingConnection 2021-01-04 10:05:34 +01:00
Mark Spanbroek 37e5eb0eb4 Move stream sending code to ngtcp2/connection module 2021-01-04 10:05:34 +01:00
Mark Spanbroek 15c212477d Remove dead code 2021-01-04 10:05:34 +01:00
Mark Spanbroek c150cde3e6 Replace handshake event by callback on Ngtcp2Connection 2021-01-04 10:05:34 +01:00