Benjamin Saunders
dd59dacc05
Remove redundant branch
2019-03-30 16:34:16 -07:00
Benjamin Saunders
25d60cca9f
Refactor close behavior
...
Closing the connection is now considered an instantaneous operation,
which causes outstanding I/O futures to fail immediately with a
distinct error and gracefully terminates IncomingStreams and, one
draining has completed, ConnectionDriver.
2019-03-30 16:34:16 -07:00
Benjamin Saunders
83da359acc
Add end-to-end handshake timeout test
2019-03-30 16:34:16 -07:00
Benjamin Saunders
d2d6b5b967
Style cleanup
2019-03-30 16:34:16 -07:00
Benjamin Saunders
73426303c1
Notify endpoint of drained state immediately
...
Now that endpoints no longer own connections, there is no need to
ensure the application has explicitly closed a connection before the
endpoint discards state.
2019-03-30 16:34:16 -07:00
Benjamin Saunders
5be6a0c6f9
Process connection-emitted events after they're generated
2019-03-30 16:34:16 -07:00
Benjamin Saunders
6c0c72b1f1
Fast idle timeout in interop tool
2019-03-30 16:34:16 -07:00
Benjamin Saunders
cf341333b6
Clearer close timer handling
...
No semantic change, but less doing something then immediately undoing it.
2019-03-30 16:34:16 -07:00
Benjamin Saunders
505aef1f47
Update Endpoint::connection_remotes for migrations
...
We also get rid of EndpointEvent::Closed.remote, since storing the
current remote in Endpoint is easy and simplifies both Closed and
Migrated.
2019-03-30 16:34:16 -07:00
Benjamin Saunders
748a52b2dd
Shut down endpoint driver when all references to it are dead
2019-03-30 15:13:48 -07:00
Benjamin Saunders
7c82e3c8a4
Handle dropped Incoming stream gracefully
2019-03-30 15:13:48 -07:00
Benjamin Saunders
9455ce3925
Keep incoming connections alive until they're accepted
2019-03-30 15:13:48 -07:00
Dirkjan Ochtman
d337f29431
Return Err when writing to unknown stream (see #87 )
2019-03-30 21:32:02 +01:00
Dirkjan Ochtman
967044c592
Add new module spaces to contain PacketSpace and dependencies
...
This also helps reducing the size of the connection module.
Fold dedup module into it, since it is relatively small.
2019-03-30 13:02:44 -07:00
Dirkjan Ochtman
5032c0e50f
Privatize more interfaces (in particular for newly-public Connection)
2019-03-30 13:02:44 -07:00
Dirkjan Ochtman
f63fd2b811
Introduce shared module for widely used types
...
This removes the dependency from connection on endpoint which I always found
ugly, and generally shrinks some of our larger modules by extracting types
that are not tightly coupled to their those modules' other contents.
2019-03-30 13:02:44 -07:00
Dirkjan Ochtman
c66937e55b
Move enums from endpoint to connection
2019-03-30 13:02:44 -07:00
Dirkjan Ochtman
340467f632
Move Assembler into its own module
2019-03-30 13:02:44 -07:00
Dirkjan Ochtman
5c5cd687f2
Use default (thread pool) runtime for quinn tests
2019-03-29 18:40:46 +01:00
Dirkjan Ochtman
548d8cc21e
Fix panic when rx_packet_time > now
2019-03-29 18:40:46 +01:00
Dirkjan Ochtman
b9eb025bdc
Make Connection instants deterministic
2019-03-29 18:40:46 +01:00
Dirkjan Ochtman
2fb4336cdb
Use sync oneshot channels for thread safety
2019-03-29 18:40:46 +01:00
Dirkjan Ochtman
a8e07e0d25
Replace Rc<RefCell<>> with Arc<Mutex<>> in quinn
2019-03-29 18:40:46 +01:00
Benjamin Saunders
d36d015c9b
Fix handshake retransmit timing
...
in_flight.crypto can be 0 when retransmitted handshake data is pending
but not yet actually retransmitted.
2019-03-29 05:44:48 +01:00
Benjamin Saunders
3995ea2006
Update protocol version numbers
2019-03-29 05:44:48 +01:00
Benjamin Saunders
5cc3a52088
Cosmetic cleanup
2019-03-29 05:44:48 +01:00
Benjamin Saunders
bdb73b8b85
Remove client-side version negotiation
2019-03-29 05:44:48 +01:00
Benjamin Saunders
c317061033
Switch idle timeout units to milliseconds
2019-03-29 05:44:48 +01:00
Dirkjan Ochtman
7d1d39d392
Minor clippy fixes
2019-03-28 17:19:25 -07:00
Dirkjan Ochtman
8f4e30bc00
Split quinn module into endpoint and connection parts
2019-03-28 17:19:25 -07:00
Dirkjan Ochtman
47093ef1ca
Split tests module to factor out test infrastructure
2019-03-28 17:19:25 -07:00
Dirkjan Ochtman
619246f4a4
Make some members of Streams private
2019-03-28 17:19:14 -07:00
Dirkjan Ochtman
6ae1e9f4a8
Move initialization of Streams type into new() method
2019-03-28 17:19:14 -07:00
Dirkjan Ochtman
5ea7cc97cf
Move stream reset code into Streams type
2019-03-28 17:19:14 -07:00
Dirkjan Ochtman
16210a1646
Move stream acceptance into Streams type
2019-03-28 17:19:14 -07:00
Dirkjan Ochtman
81cc247206
Move remote stream allocation into Streams type
2019-03-28 17:19:14 -07:00
Dirkjan Ochtman
749859517e
Move stream creation into Streams type
2019-03-28 17:19:14 -07:00
Dirkjan Ochtman
f74629be74
Move stream-related frame handling into Recv method
2019-03-28 17:19:14 -07:00
Nikita Baksalyar
64ed16300e
Fix builds on musl environment
...
msghdr struct in musl libc has padding fields which are private.
This commit fixes the struct initialisation code, replacing it with
manual fields assingment.
2019-03-28 09:23:00 -07:00
Benjamin Saunders
e784fe6e1d
Don't fail tests on normal connection shutdown
2019-03-28 08:28:01 +01:00
Benjamin Saunders
d17d2b1e01
Drive connections until they're drained, even with errors
2019-03-28 08:28:01 +01:00
Benjamin Saunders
a873f55911
Report draining complete when stateless reset follows close
2019-03-28 08:28:01 +01:00
Benjamin Saunders
233425160c
Fix unreliable timers
2019-03-28 08:28:01 +01:00
Benjamin Saunders
3e56beee3c
Spawn connection driver in client example and interop tool
2019-03-28 08:28:01 +01:00
Benjamin Saunders
08f663b1c6
More readable timer diagnostics
2019-03-28 08:28:01 +01:00
Benjamin Saunders
5b7b0d1173
Simplify timer handling
2019-03-28 08:28:01 +01:00
Benjamin Saunders
de43f8e477
More convenient Timer iterator
2019-03-28 08:28:01 +01:00
Benjamin Saunders
82f6c2e14f
Close unreferenced connections
2019-03-28 08:28:01 +01:00
Benjamin Saunders
399d6d58a2
Detailed must_use diagnostic
2019-03-28 08:28:01 +01:00
Benjamin Saunders
3195c757c3
Clean up after prematurely dropped connections
2019-03-28 08:28:01 +01:00