Commit Graph

381 Commits

Author SHA1 Message Date
Mark Spanbroek 056859ecd5 Handle packet loss by introducing a timeout at connection level 2020-11-19 16:54:40 +01:00
Mark Spanbroek bad48b071f Simplify 2020-11-19 16:54:40 +01:00
Mark Spanbroek 85e697b1db Timeout can be set to a moment in time 2020-11-19 16:54:40 +01:00
Mark Spanbroek 3ef5bb2c44 Move Connection.send() and .receive() into 'connection' module 2020-11-19 16:54:40 +01:00
Mark Spanbroek 138ef9dcb1 Rewrite timer tests to handle timer imprecision on macOS 2020-11-19 16:54:40 +01:00
Mark Spanbroek e4a3a1d5e8 Allow Timeout to be constructed without specifying duration 2020-11-19 16:54:40 +01:00
Mark Spanbroek 930f599c73 When timeout tests fail, print duration 2020-11-19 16:54:40 +01:00
Mark Spanbroek 4cd2e7a8b9 Add callback to timeout 2020-11-19 16:54:40 +01:00
Mark Spanbroek c2a9924dfa Introduce Timeout object 2020-11-19 16:54:40 +01:00
Mark Spanbroek 613fd8318e Provide correct timestamps to ngtcp2 2020-11-19 16:54:40 +01:00
Mark Spanbroek d17f733059 Remove send loops, fixes hangs
Instead of constantly trying to send, only send in response to
an incoming datagram.

The send loop in handshake() is replaced by an AsyncEvent.
2020-11-09 16:40:59 +01:00
Mark Spanbroek 871a3f4b91 Update to latest ngtcp2 2020-11-09 16:40:59 +01:00
Mark Spanbroek 384460024f Common setup for stream tests 2020-11-05 18:13:07 +01:00
Mark Spanbroek 4dd0534f81 Read from incoming uni-directional streams 2020-11-05 18:13:07 +01:00
Mark Spanbroek 145e2b405d Accept incoming streams 2020-11-05 18:13:07 +01:00
Mark Spanbroek 7265d6ef70 Write long messages to streams 2020-11-05 09:52:24 +01:00
Mark Spanbroek edaffcfcf6 Rename: sendLoop() -> networkLoop() 2020-11-05 09:52:24 +01:00
Mark Spanbroek 80a612ea11 Rename: waitForHandshake() -> handshake() 2020-11-05 09:52:24 +01:00
Mark Spanbroek 7af5c5376e Update max offset when receiving data
Ensures that we don't hit the max_stream_data limit
when sending data over a stream.
2020-11-05 09:52:24 +01:00
Mark Spanbroek f0c6a99a6a Fix random test failure because of dangling connection pointer 2020-11-05 09:52:24 +01:00
Mark Spanbroek 55e6800ee7 Rename: Connection.write() -> Connection.send() 2020-11-05 09:52:24 +01:00
Mark Spanbroek 805fefe50c Rename: Connection.read() -> Connection.receive() 2020-11-05 09:52:24 +01:00
Mark Spanbroek 38433d723f Introduce flow control, which allows async handshake completion 2020-11-05 09:52:24 +01:00
Mark Spanbroek 21f4f995d7 Write to stream results in datagram added to outgoing queue 2020-11-05 09:52:24 +01:00
Mark Spanbroek dfecdc9294 Replace outgoing seq with an AsyncQueue 2020-11-05 09:52:24 +01:00
Mark Spanbroek 6a54952c8b Introduce sequence of outgoing datagrams 2020-11-05 09:52:24 +01:00
Mark Spanbroek ddd874b6d1 Support reading and writing of zero-length seqs 2020-11-05 09:52:24 +01:00
Mark Spanbroek cfa6df32c0 Add Datagram.len 2020-11-05 09:52:24 +01:00
Mark Spanbroek 74dc38d01c Combine data and explicit congestion notification into Datagram object 2020-11-05 09:52:24 +01:00
Mark Spanbroek 783a6c0000 Rename: Datagram -> DatagramBuffer 2020-11-05 09:52:24 +01:00
Mark Spanbroek 8d5dacdf61 Introduce buffer at connection level
Simplifies Connection.write() and Stream.write() calls.
2020-11-05 09:52:24 +01:00
Mark Spanbroek f352c6d88c Close stream 2020-11-05 09:52:24 +01:00
Mark Spanbroek 05b6e58028 Write to stream 2020-11-05 09:52:24 +01:00
Mark Spanbroek a23f257b14 Use the 'std' prefix for standard library imports 2020-11-05 09:52:24 +01:00
Mark Spanbroek d390d3660f Move datagram one level up 2020-11-05 09:52:24 +01:00
Mark Spanbroek e03ba54b00 Provide correct path when writing to datagram 2020-11-05 09:52:24 +01:00
Mark Spanbroek 84b0e60a4b Remove erroneous udp write loop, increase test coverage 2020-11-05 09:52:24 +01:00
Mark Spanbroek 5e1ba19763 Move stream tests into separate file 2020-11-05 09:52:24 +01:00
Mark Spanbroek 2709281696 Move test helpers performHandshake() and zeroAddress into separate files 2020-11-05 09:52:24 +01:00
Mark Spanbroek c1d8950ba3 Remove duplication in test 2020-11-05 09:52:24 +01:00
Mark Spanbroek dece29fdfa Fix: Connection should be passed by reference to avoid double free 2020-11-05 09:52:24 +01:00
Mark Spanbroek 7dca48fffb Make congestion notification optional in the API 2020-11-05 09:52:24 +01:00
Mark Spanbroek ee9e7d9c27 Open uni-directional stream 2020-11-05 09:52:24 +01:00
Mark Spanbroek 621f3086ee improve test descriptions 2020-10-13 08:49:39 +02:00
Mark Spanbroek b889e029ed Update status in Readme 2020-10-13 08:49:39 +02:00
Mark Spanbroek 7c88a40612 Raise IOError when server connection can not be created 2020-10-13 08:49:39 +02:00
Mark Spanbroek e0ab0fee82 Rename: testNgtcp2 -> testTransportParameters 2020-10-13 08:49:39 +02:00
Mark Spanbroek d5d2319b70 Raise IOError when reading datagram fails 2020-10-13 08:49:39 +02:00
Mark Spanbroek 76f3a94aed Raise IOError when things go wrong with transport parameters 2020-10-13 08:49:39 +02:00
Mark Spanbroek cadab049e5 Replace assert with doAssert for return value checks
Only for those cases where a non-zero return value indicates a
programmer error.
2020-10-13 08:49:39 +02:00