Commit Graph

465 Commits

Author SHA1 Message Date
Oliver Gould
dad113e17b Disallow nightly failures (#115)
Always install rustfmt since nightly may change underneath it, causing
linking to break.

Apply rustfmt
2017-09-24 19:25:50 -07:00
Eliza Weisman
a72a6bc8f0 Rewrite flow control tests to use newer mock API (#108)
I've rewritten the tests `flow_control::stream_close_by_data_frame_releases_capacity()` and `flow_control::stream_close_by_trailers_frame_releases_capacity()` to use the new mock API. This will make modifying these tests a bit easier in order to expect the correct behavior in my reset-on-drop branch.
2017-09-21 12:58:50 -05:00
Sean McArthur
6ec7f38cd7 add test for client sending over max concurrent limit (#105) 2017-09-19 15:31:35 -07:00
Sean McArthur
db8c109817 Client::poll_ready() returns an Error if next stream ID would overflow (#103)
Closes #102
2017-09-19 14:16:32 -07:00
Sean McArthur
0c8bd75224 check for StreamId overflow (#68) 2017-09-19 13:10:48 -07:00
Carl Lerche
e049dcb62b Rename Client::request -> send_request (#98)
All other fns have a send prefix.
2017-09-18 21:22:15 -07:00
Eliza Weisman
9812894709 Add fixtures, examples, util, and src/hpack/test to Codecov ignore list (#96)
We don't care about covering code in these directories, so exclude them from test coverage.
2017-09-18 15:02:18 -05:00
Sean McArthur
71b246a0fb Merge pull request #91 from seanmonstar/config-push-promise
add Client config to disable server push
2017-09-18 11:16:49 -07:00
Sean McArthur
21f7e54ce8 load headers when receiving PushPromise frames 2017-09-18 10:49:35 -07:00
Sean McArthur
a8a4cd2be1 add Client config to disable server push
- Adds `Client::builder().enable_push(false)` to disable push
- Client sends a GO_AWAY if receiving a push when it's disabled
2017-09-18 10:49:35 -07:00
Sean McArthur
ed4e67c1a4 Merge pull request #93 from seanmonstar/codec-unstable
remove unstable for Codec methods used internally
2017-09-18 10:03:58 -07:00
Sean McArthur
92030f634f remove unstable for Codec methods used internally 2017-09-17 14:28:45 -07:00
Oliver Gould
1022e04276 Merge pull request #94 from carllerche/ver/clone-builders
Derive Clone for Builder types
2017-09-17 14:15:24 -07:00
Oliver Gould
303b896095 Derive Clone for Builder types 2017-09-17 20:38:55 +00:00
Sean McArthur
a8e117d09f Merge pull request #88 from seanmonstar/config-max-frame-size
Configure max frame size
2017-09-14 17:29:49 -07:00
Sean McArthur
c32015d48e add support for configuring max frame size
- Adds `max_frame_size` to client and server builders
- Pushes max_frame_size into Codec
- Detects when the Codec triggers an error from a frame too big
- Sends a GOAWAY when FRAME_SIZE_ERROR is encountered reading a frame
2017-09-14 17:03:43 -07:00
Sean McArthur
8984a46a92 Merge pull request #87 from seanmonstar/server-config
add Server Builder
2017-09-14 16:59:37 -07:00
Sean McArthur
7531e5276b add Server Builder 2017-09-14 16:36:51 -07:00
Eliza Weisman
e4b8dde1d3 Split Travis build into stages (#62)
Adds code coverage checking.
2017-09-14 16:33:34 -07:00
Carl Lerche
f84a1bdd1f Notify connection on connection window expansion (#86)
When capacity is released back to the connection and a connection level
window update needs to be sent out, the connection task needs to be
notified in order for the send to actually happen.
2017-09-14 13:50:52 -07:00
Sean McArthur
eaf4192838 Merge pull request #89 from mehcode/patch-1
Drive by spelling fix ( ugprade -> upgrade )
2017-09-13 21:32:38 -07:00
Ryan Leckey
76a2792d7d ugprade -> upgrade 2017-09-13 21:17:01 -07:00
Sean McArthur
dd6cac62e8 Merge pull request #79 from seanmonstar/client-config
Intial Client Configuration
2017-09-13 14:55:36 -07:00
Sean McArthur
3ec0e85e56 add test when stream window overflows before conn window 2017-09-13 14:32:27 -07:00
Sean McArthur
e2cda1860b fix Body to return errors when there is recv error 2017-09-13 14:32:27 -07:00
Sean McArthur
ed472f109c add client::Builder to configure Clients 2017-09-13 14:32:27 -07:00
Sean McArthur
d0afe30ab3 fix recv connection flow should always use default initial window size 2017-09-13 14:32:27 -07:00
Carl Lerche
b01e3dff12 Annotate unstable API fns with cfg 2017-09-13 14:14:41 -07:00
Sean McArthur
f7d14861e5 rustfmt: add trailing commas in match arms, set fn call to block stle (#85) 2017-09-12 19:29:06 -07:00
Oliver Gould
de1edf4873 Merge pull request #71 from carllerche/ver/rustfmt
Use rustfmt to enforce consistent formatting
2017-09-12 16:00:06 -07:00
Oliver Gould
897bf84163 Use rustfmt to enforce consistent formatting
This change adds a .rustfmt.toml that includes ALL supported settings,
12 of which we have overridden to attempt to cater to our own
proclivities.

rustfmt is checked in the rust-nightly CI job.
2017-09-12 22:29:35 +00:00
Carl Lerche
93925e6d1f Limit send flow control bug to window_size (#78)
Senders could set the available capacity greater than the current
`window_size`.  This caused a panic when the sender attempted
to send more than the receiver could accept.
2017-09-12 10:48:11 -07:00
Eliza Weisman
9448a19408 Factor out reset on RecvError::Stream (#76) 2017-09-11 13:07:37 -07:00
Eliza Weisman
11de86b34e Make Codec max frame length configurable (#57) 2017-09-11 12:56:40 -07:00
Sean McArthur
460afa41c8 Add connection window overflow test (#72) 2017-09-11 10:17:43 -07:00
Carl Lerche
5c0efcf8c4 Ref count stream state and release when final (#73)
Previously, stream state was never released so that long-lived connections
leaked memory.

Now, stream states are reference-counted and freed from the stream slab
when complete.  Locally reset streams are retained so that received frames
may be ignored.
2017-09-10 16:01:19 -07:00
Carl Lerche
daa54b9512 Rewrite a flow test 2017-09-08 13:42:14 -07:00
Carl Lerche
16f0345c16 Update README to reflect progress 2017-09-08 12:50:22 -07:00
Oliver Gould
17bebe719a Increment stream window capacity when sending window update (#67) 2017-09-08 12:24:06 -07:00
Carl Lerche
c47717204c Flow control bug fix (#70)
The requested capacity was not decreased as data is written.
2017-09-08 12:15:46 -07:00
Sean McArthur
14f3f87da6 Merge pull request #66 from carllerche/flow-control-bugs
Fix some flow control bugs
2017-09-07 21:02:33 -07:00
Sean McArthur
b9e9fc64a7 Merge pull request #64 from seanmonstar/tests-ergo-frames
add ergonomics to testing with frames
2017-09-07 20:16:39 -07:00
Sean McArthur
018f00b8db update flow control tests to use frame builders 2017-09-07 17:06:09 -07:00
Sean McArthur
aef11623ac add recv_frame and send_frame extensions for Handle Futures 2017-09-07 17:05:43 -07:00
Sean McArthur
cc70ac1ef2 fix style to match crate 2017-09-07 17:05:07 -07:00
Carl Lerche
ae6bad6cef Fix some flow control bugs
When a stream is closed, connection level capacity should be released
back to the connection and then assigned to other streams waiting for
capacity.
2017-09-07 16:45:20 -07:00
Carl Lerche
9b42dafd24 Extract drive combinator to test support 2017-09-07 15:36:54 -07:00
Carl Lerche
38bbf30b2f Fix bug in prioritization (#63)
The stream buffered data counter was never decremented.
2017-09-07 14:12:21 -07:00
Sean McArthur
342d283cc5 add ergonomics to testing with frames 2017-09-07 13:09:57 -07:00
Sean McArthur
09744f38ef add a ReleaseCapacityTooBig variant to UserError 2017-09-07 08:20:03 -07:00