Commit Graph

3653 Commits

Author SHA1 Message Date
Benjamin Saunders af50ca0154 core: fix stream ID fencepost error 2018-05-12 23:25:32 -07:00
Benjamin Saunders 6045f79bd6 core: don't ignore handshake completion ACKs
Improves early RTT estimation
2018-05-12 22:35:36 -07:00
Benjamin Saunders 31d35944aa core: fix high-latency handshakes and related bugs
Packets that complete the handshake must be considered implicit
acknowledgement of all outstanding handshake packets, otherwise
retransmitted handshake packets that are not ultimately needed might
never be acknowledged, leading to infinite retransmits until the
congestion window shrinks to unusability.
2018-05-12 16:17:33 -07:00
Benjamin Saunders 15662a3f44 core: refactor tests to support passage of time 2018-05-12 11:02:30 -07:00
Dirkjan Ochtman 946a41af37 Don't error out on Handshake messages without Stream 0 2018-05-12 15:04:16 +02:00
Dirkjan Ochtman 44a7de1808 Use Handshake key for late-arriving Handshake messages 2018-05-12 15:03:35 +02:00
Dirkjan Ochtman 74fe4f77b1 Fix integer width for some transport parameters 2018-05-12 14:56:33 +02:00
Dirkjan Ochtman 5641a67cbc Actually use check function 2018-05-12 14:37:30 +02:00
Dirkjan Ochtman bc56d27bba Allow streams by default 2018-05-12 14:36:58 +02:00
Benjamin Saunders a4fbb443ea examples: less monolithic server future 2018-05-11 18:05:38 -07:00
Dirkjan Ochtman 2216273b0d Store received short packets 2018-05-11 15:10:45 +02:00
Dirkjan Ochtman ac6b5b7eef Validate packet type of short packet 2018-05-11 15:07:59 +02:00
Dirkjan Ochtman 30866210cd Use higher-level endpoint API in tests 2018-05-11 15:07:14 +02:00
Dirkjan Ochtman 4079636e99 Let Endpoint handle packet decoding where possible 2018-05-11 15:03:34 +02:00
Dirkjan Ochtman 8740b7b222 Add comprehensive handle() method to Endpoint 2018-05-11 14:51:41 +02:00
Dirkjan Ochtman 67f02021a9 Make client future more generically usable 2018-05-11 14:37:18 +02:00
Dirkjan Ochtman 7d98846de0 Rely on new match binding mechanics to simplify code 2018-05-11 10:21:53 +02:00
Dirkjan Ochtman 7f90699f94 Reformat with updated toolchain 2018-05-11 10:10:55 +02:00
Benjamin Saunders e40d241c0d core: sni accessor 2018-05-11 00:29:42 -07:00
Benjamin Saunders 6160a53625 tokio: update for rustc 1.26 2018-05-11 00:25:27 -07:00
Benjamin Saunders 1078ce9f76 core: fix inadvertent sending of certificate requests 2018-05-11 00:24:21 -07:00
Dirkjan Ochtman ca49ab8f1b Use simpler Buf/BufMut methods to handle byte order 2018-05-08 15:28:21 +02:00
Dirkjan Ochtman 38f31287ba Fix Debug impl for ConnectionId to zero-pad hex formatting 2018-05-08 12:09:42 +02:00
Dirkjan Ochtman 23c03b5114 Fix formatting with cargo fmt 2018-05-08 09:25:22 +02:00
Dirkjan Ochtman d7f1a03024 Extend test to cover decoding of protected packets 2018-05-08 09:25:11 +02:00
Dirkjan Ochtman 0138147f71 Implement basic support for PING frames 2018-05-08 09:24:11 +02:00
Dirkjan Ochtman a852b48247 Export separate 1-RTT secrets for client and server 2018-05-08 09:23:47 +02:00
Dirkjan Ochtman 794c1b78fe Correct encoding of short packet headers 2018-05-07 14:57:31 +02:00
Dirkjan Ochtman 0c5a598cf8 Build packet queue instead of doing strict request-response 2018-05-07 14:57:31 +02:00
Dirkjan Ochtman d06976f86a Keep track of stream 0 offsets 2018-05-07 14:04:48 +02:00
Dirkjan Ochtman 02a37af854 Implement basic support for close frames 2018-05-07 13:55:35 +02:00
Dirkjan Ochtman 7c1026b507 Fix formatting with cargo fmt 2018-05-07 13:24:48 +02:00
Dirkjan Ochtman 4400dea713 Add support for responding to PATH_CHALLENGE frames 2018-05-07 13:24:41 +02:00
Dirkjan Ochtman f88bd55e0f Maintain explicit state in Endpoint 2018-05-07 13:09:37 +02:00
Dirkjan Ochtman 1a085dd5ff Implement Debug for Secret 2018-05-07 13:09:20 +02:00
Dirkjan Ochtman 734c1e1e6c Fix decoding of padding frames, add test 2018-05-07 13:01:12 +02:00
Dirkjan Ochtman bc0f0a79af Add basic support for PathChallenge/PathResponse frames 2018-05-07 11:40:50 +02:00
Dirkjan Ochtman bafbb59749 Assert to check payload length in header 2018-05-07 09:48:40 +02:00
Dirkjan Ochtman bcca684176 Rename variable for consistency 2018-05-07 09:47:23 +02:00
Dirkjan Ochtman 0cba76cc3b Encode into byte slices 2018-05-07 09:46:43 +02:00
Dirkjan Ochtman 2a4b14503d Introduce custom error type and stop unwrapping 2018-05-05 17:58:58 +02:00
Dirkjan Ochtman 2627ee5b61 Prevent use of unwrap() 2018-05-05 17:26:06 +02:00
Dirkjan Ochtman 4f72bd902c Add test for resolving Client::connect() 2018-05-05 15:14:10 +02:00
Dirkjan Ochtman 5d40a6a9b6 Split Client::connect() code to allow testing 2018-05-05 15:13:55 +02:00
Dirkjan Ochtman f79c780898 Check for IPv4 addresses in client connect code 2018-05-05 15:13:22 +02:00
Dirkjan Ochtman 4518f1ada2 Refactor test utilities to enable more tests 2018-05-05 15:12:29 +02:00
Dirkjan Ochtman b30b60e4aa Update ALPN protocol to draft-11 2018-05-05 14:14:32 +02:00
Dirkjan Ochtman df82cfb190 Accept Handshake packets in server 2018-05-05 14:07:14 +02:00
Dirkjan Ochtman b0dd26129a Allow Client::connect() to resolve to Client 2018-05-05 14:06:11 +02:00
Dirkjan Ochtman 28b2eaae7c Rename QuicStream to Client 2018-05-05 13:19:57 +02:00