Граф коммитов

636 Коммитов

Автор SHA1 Сообщение Дата
Martin Thomson 002d73ecd9 Small tweaks 2019-04-02 12:05:38 +02:00
Andy Grover ab3a34be5e read_with_amount() no longer in use anywhere, remove it 2019-04-01 15:04:26 -07:00
Andy Grover bb7e8e6cdd h3: ClientRequest doesn't need a role member
This is another little cleanup which I hope is correct, please forgive me
if not. But basically, in ClientRequest code, don't we know that role is
Client?
2019-04-01 15:01:47 -07:00
Andy Grover 8ce3a4d31a h3: misc cleanups
Replace &String with &str in fn params, this is almost always preferable.

Use into() instead of String::from(), less words.

rustfmt also did some whitespace changes.
2019-04-01 15:01:44 -07:00
Andy Grover 4517fc1cd2 h3: Make HttpConn.role use Connection::role() 2019-04-01 15:00:43 -07:00
Martin Thomson 4ecd0be752 Fixup formatting 2019-04-01 23:28:48 +02:00
Martin Thomson f9206e1bdb Use std::fmt::Display for logging context 2019-04-01 14:13:14 +02:00
EKR 93e33b954c Enable logging with env_logger 2019-03-31 18:33:00 -07:00
Dragana Damjanovic d40729bfb2 Merge branch 'master' of https://github.com/mozilla/neqo 2019-03-28 11:14:43 +01:00
Dragana Damjanovic 3a26fae3d5 Loss Recovery. 2019-03-28 11:13:51 +01:00
Andy Grover b6f6c7bede Implement send/recv stream reset
Redo enum SendStreamState to match Recv.

Use named members instead of tuples.
2019-03-26 15:52:18 -07:00
EKR 3fb261df18 Track sent packets 2019-03-22 09:59:25 -07:00
Dragana Damjanovic 6672958ec4 Merge branch 'master' of https://github.com/mozilla/neqo 2019-03-22 13:25:55 +01:00
Dragana Damjanovic eafb17dfd7 Connect qpack with http3 and implement the qpack settings. 2019-03-22 13:16:01 +01:00
Andy Grover 066c9c562d break send/recv stream into separate files
Cut down Sendable/Recvable traits to only include methods the client will
use.

Stub somewhere to queue flow control frames.

rustfmt caused some whitespace changes in qpack code.
2019-03-20 15:26:10 -07:00
Andy Grover ed93891677 fix return types and re-add time as param to process()
Connection::new_client and new_server can fail, so make them return
Res<>.

Add cur_time to process() and use where clause to help readability

Fix tests and client/server as needed

Also, Frame::marshal() never fails so have it not return a Result.
2019-03-20 09:45:30 -07:00
Martin Thomson 3249eaaf40 Remove Res<> from process method
We need to have callers preserve the connection after an error is
encountered so that CONNECTION_CLOSE frames can be sent.  An application
might choose to abandon a connection as soon as it hits closing, but the
basic contract here is that processing continues until the state changes
to closed.
2019-03-20 16:33:02 +11:00
Dragana Damjanovic 8c1b8dd29c implement a qpack decoder and encoder. 2019-03-20 02:07:34 +01:00
Martin Thomson a0d78552d0 First client stub 2019-03-19 18:05:54 +11:00
Martin Thomson 47271cf85d Major rework of error handling 2019-03-15 21:38:03 +11:00
Martin Thomson 0b5d5b1039 Deny warnings 2019-03-15 09:20:03 +11:00
Andy Grover a13ceb566b Implement SendStreamState
encapsulate send buffer and other stuff in a state enum. This ensures
vars can only be accessed when in the right state, and nicely discards
things as they are no longer needed.

Add reset_acked(), which we might need someday (and avoids a warning about
unused enum variant in the meantime)
2019-03-13 13:14:42 -07:00
Andy Grover 59e163fa12 transport: work on stream reset and next_bytes cleanup
Renamed conn::reset_stream to stream_reset so that all stream methods
start with "stream_"

Remove allow_partial param to TxBuffer::next_bytes. All users
now call mark_as_sent().
2019-03-12 11:11:37 -07:00
Andy Grover 92faf4b75c http3: Fix for Connection changes 2019-03-11 14:50:15 -07:00
Andy Grover bfb5be4dac http3: get rid of some casts because read() returns usize now
This aligns better with what read functions in stdlib do.
2019-03-11 14:26:39 -07:00
Dragana Damjanovic ea9942c735 Huffman decoder 2019-03-08 14:45:32 +01:00
Andy Grover bba17eb132 Implement stream send and receive
Add generate_stream_frames() as a FrameGenerator

Create new stream if we receive a stream frame for it

add Connection::stream_send() and stream_close_send()

Rename get_readable/writable_streams() to get_read/write_streams. Change
them to get a trait object w/o calling as_recvable() and as_sendable().
Create new methods called get_readable/writeable_streams to get streams
filtered by if they have data available or can accept data.

Change get_cid_len to 8, which was needed for streams to work.

Add test_conn_stream()

Make changes as needed to http3 and other code since some connection and
stream APIs now can fail

Make streams collection a btreemap for now, for deterministic iteration
  ordering.

Tidy some use stmts in data.rs

Add next_bytes() and final_size() to trait Sendable.

Make Sendable::send() return Res and close() set final_size.
2019-03-04 14:46:41 -08:00
Dragana Damjanovic e0c21c3189 Fix http3 2019-03-04 10:04:44 +01:00
Dragana Damjanovic 1f8d34328f http3 2019-03-02 12:35:20 +01:00
Dragana Damjanovic 43dcc5fc89 merge 2019-03-02 12:33:23 +01:00
Martin Thomson dc0733e49c Checkpoint 2019-02-21 08:59:43 -08:00
Dragana Damjanovic 95d2526303 format 2019-02-21 08:57:17 -08:00
Dragana Damjanovic ca0d54d149 Merge branch 'master' of https://github.com/mozilla/neqo 2019-02-21 08:53:13 -08:00
Dragana Damjanovic f0445123ad add test connection and stream. 2019-02-21 08:51:13 -08:00
Bobby Holley 0cf4ceb2c6 Rename http3 to neqo-http3. 2019-02-20 14:02:40 -08:00
Dragana Damjanovic 3113ec240e add h3 frames 2019-02-20 11:28:00 -08:00