Dirkjan Ochtman
e32f9d99cf
Handle errors from creating TLS server configuration
2018-05-30 15:58:23 +02:00
Dirkjan Ochtman
7db2c3753a
Use tokio::run() to run the example server
2018-05-30 15:55:24 +02:00
Dirkjan Ochtman
94f31ffef3
Fix client default local addresses to allow any interface
2018-05-30 15:47:55 +02:00
Dirkjan Ochtman
b6e436b514
Use current_thread::Runtime for running tests
2018-05-30 13:24:04 +02:00
Dirkjan Ochtman
aa1e2f9afa
Add utility methods to get Dir and Side from stream IDs
2018-05-29 16:57:31 +02:00
Dirkjan Ochtman
241b01d83a
Use handle_tls() method for initial packet
2018-05-29 14:55:38 +02:00
Dirkjan Ochtman
438cbe5a70
Make packetization code more functional
2018-05-29 14:44:53 +02:00
Dirkjan Ochtman
4790475ad7
Always send two byte payload lengths in short headers
2018-05-29 14:36:32 +02:00
Dirkjan Ochtman
4b1b157be7
Decide header type based on connection state
2018-05-29 14:36:32 +02:00
Dirkjan Ochtman
1035ca61cb
Improve error message on invalid connection state
2018-05-29 14:36:32 +02:00
Dirkjan Ochtman
ee6412d443
Add FinalHandshake state to connection state machine
2018-05-29 14:36:11 +02:00
Dirkjan Ochtman
92e8c4d06d
ConnectionState::decode_key() can now be private
2018-05-29 13:53:58 +02:00
Dirkjan Ochtman
9a2d032eb5
Trigger client initial packet creation from connect() method
2018-05-29 11:32:48 +02:00
Dirkjan Ochtman
2ad307fb52
Simplify Future implementation for Client
2018-05-29 11:32:48 +02:00
Dirkjan Ochtman
b3af4f3432
Simplify socket address literals
2018-05-29 09:37:11 +02:00
Dirkjan Ochtman
b452b06c00
Implement support for header-only negotiation packets
2018-05-29 09:16:00 +02:00
Dirkjan Ochtman
8952e53878
Implement more refined handling of packet number extraction
2018-05-29 09:13:55 +02:00
Dirkjan Ochtman
9045e9eacc
Refactor Client/ConnectFuture construction sequence
2018-05-28 17:11:14 +02:00
Dirkjan Ochtman
d08f36add7
Enable synchronous access to server send queue
2018-05-28 16:35:31 +02:00
Dirkjan Ochtman
19c79b6e66
Move handling of received packets into a separate method
2018-05-28 16:35:31 +02:00
Emeric Chevalier
cbaf2b5154
Switch decode fn from codec trait to return error
2018-05-28 16:11:20 +02:00
Dirkjan Ochtman
d9cf21ef18
Reformat without screwing up carefully formatted byte array
2018-05-28 15:13:56 +02:00
Dirkjan Ochtman
e21abf471b
Simplify server handling of Initial packets
2018-05-28 15:10:50 +02:00
Joseph Birr-Pixton
6e556e1b70
Ignore unknown TransportParameterIds when decoding
2018-05-28 15:10:27 +02:00
Dirkjan Ochtman
ba82eaa219
Change Server to spawn one task per connection ( fixes #7 )
...
The Connection owns the ConnectionState, the SocketAddr, and two channel
endpoints to communicate with the server.
With this setup, (a) the Server no longer blocks on processing incoming
packets, and (b) the server will make progress on sending queued packets
even if no packets are coming in.
2018-05-28 14:27:08 +02:00
Dirkjan Ochtman
adcb68121e
Fix and simplify decoding of padding frames
2018-05-28 14:25:12 +02:00
Dirkjan Ochtman
4ce89742ab
Fix formatting with cargo fmt
2018-05-28 12:10:41 +02:00
Dirkjan Ochtman
7a5fa3ea64
Merge packet building functions
2018-05-28 12:10:26 +02:00
Dirkjan Ochtman
52163298e8
Upgrade to rand-0.5
2018-05-22 16:42:28 +02:00
Dirkjan Ochtman
e19a548925
Improve ConnectFuture API for robustness ( fixes #9 )
2018-05-21 21:34:32 +02:00
Dirkjan Ochtman
945ea60c5a
Improve logging for server-sent messages
2018-05-21 21:19:02 +02:00
Dirkjan Ochtman
1e54ee7ee8
Improve robustness of encoded handshake test ( fixes #10 )
2018-05-21 21:18:10 +02:00
Dirkjan Ochtman
5ec14c185f
Move PeerData into conn_state module
2018-05-21 20:52:09 +02:00
Dirkjan Ochtman
680622ebf2
Remove almost unused convenience method
2018-05-21 20:51:59 +02:00
Dirkjan Ochtman
4ee71cb2c8
Rename Endpoint type to ConnectionState
2018-05-21 20:18:17 +02:00
Dirkjan Ochtman
7a60ccedf7
Fix use statement order per cargo fmt
2018-05-21 17:29:19 +02:00
Dirkjan Ochtman
6e9d638e4e
Start adding some code for HTTP
2018-05-21 17:29:08 +02:00
Dirkjan Ochtman
a3e6cbb901
Add back question mark for client socket connect
2018-05-21 17:27:54 +02:00
Dirkjan Ochtman
b2e0c83e39
Be more flexible about supporting IPv4 and IPv6
2018-05-21 17:24:23 +02:00
Dirkjan Ochtman
5e79ef3342
Only require tokio-udp for the library
2018-05-19 14:18:54 +02:00
Dirkjan Ochtman
8c27706cec
Split up tests module
2018-05-19 14:08:50 +02:00
Dirkjan Ochtman
9f87c5de6b
Send one Handshake packet per TLS message to prevent large packets
2018-05-18 15:18:08 +02:00
Dirkjan Ochtman
dc950a183c
Add logging in the server
2018-05-18 15:16:17 +02:00
Dirkjan Ochtman
a53135dc99
Remove reference to staged module http
2018-05-17 20:59:08 +02:00
Dirkjan Ochtman
36b9a8d874
Merge Endpoint packet handling methods
2018-05-17 20:32:08 +02:00
Dirkjan Ochtman
114544197a
Make loop nicer as suggested by clippy
2018-05-17 15:00:58 +02:00
Dirkjan Ochtman
a05067e358
Let Streams request new stream and notify connection about it
2018-05-17 14:58:09 +02:00
Dirkjan Ochtman
18d7662414
Add mechanism for Streams to wake up connection future
2018-05-17 14:56:34 +02:00
Dirkjan Ochtman
a7b2e0868f
Make some Endpoint methods private
2018-05-17 14:54:52 +02:00
Dirkjan Ochtman
0311393a6e
Let Endpoint queue frames from Streams
2018-05-17 14:49:59 +02:00