Commit Graph

22 Commits

Author SHA1 Message Date
Sean McArthur
74d02933a5 Fix warnings about deprecated Error::description 2020-01-29 15:55:28 -08:00
Sean McArthur
3cfcab016e Remove public Error constructor from io::Error (#420) 2019-10-07 15:29:38 -07:00
Jakub Beránek
db6b841e67 Update crate to Rust 2018 (#383) 2019-07-23 10:18:43 -07:00
samamill
12e0d26945 Added functions to access io::Error in h2::Error (#311)
Fixes #310
2018-09-24 10:12:46 -07:00
Carl Lerche
78455a4496 Add docs for shared types (#216)
Add documentation for types shared between the client and server.
2018-01-11 15:00:16 -08:00
Oliver Gould
2e28f553ba Expose h2::Error::reason (#166) 2017-10-21 13:00:35 -07:00
Sean McArthur
c4ca8f7def Client::poll_ready and send_request may return Connection Errors (#132)
Closes #131
2017-10-04 15:22:10 -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
c122e97127 Refactor errors (#46)
This patch does a bunch of refactoring, mostly around error types, but it also
paves the way to allow `Codec` to be used standalone.

* `Codec` (and `FramedRead` / `FramedWrite`) is broken out into a codec module.
* An h2-codec crate is created that re-exports the frame and codec modules.
* New error types are introduced in the internals:
  * `RecvError` represents errors caused by trying to receive a frame.
  * `SendError` represents errors caused by trying to send a frame.
  * `UserError` is an enum of potential errors caused by invalid usage
    by the user of the lib.
  * `ProtoError` is either a `Reason` or an `io::Error`. However it doesn't
    specify connection or stream level.
  * `h2::Error` is an opaque error type and is the only error type exposed
    by the public API (used to be `ConnectionError`).

There are misc code changes to enable this as well. The biggest is a new "sink"
API for `Codec`. It provides buffer which queues up a frame followed by flush
which writes everything that is queued. This departs from the `Sink` trait in
order to provide more accurate error values. For example, buffer can never fail
(but it will panic if `poll_ready` is not called first).
2017-09-02 11:12:50 -07:00
Carl Lerche
9d45255c75 H2 headers must be lower case 2017-08-30 18:16:21 -04:00
Carl Lerche
8a15663ed2 Progress towards allowing large writes 2017-08-11 16:57:51 -07:00
Oliver Gould
8453435422 wip: improve split stream tracking 2017-07-21 01:30:39 +00:00
Oliver Gould
0d84c98c89 wip 2017-07-19 19:53:33 +00:00
Oliver Gould
79d3aee1dc refuse streams that would violate max concurrency settings.
improve ping control API
2017-07-17 22:18:03 +00:00
Oliver Gould
fb4f0bc5af resets too 2017-07-17 08:18:38 +00:00
Oliver Gould
c1f9ff8fd8 wip: problems with Frame::len() 2017-07-17 01:07:21 +00:00
Oliver Gould
41ffd1d44f closer to flow control 2017-07-12 21:04:58 +00:00
Carl Lerche
36a1c6f045 More tests 2017-07-11 20:50:41 -07:00
Carl Lerche
981af88838 Get data frames working 2017-07-08 22:23:44 -07:00
Carl Lerche
f6b6d0c7e8 Start state transition verification + refactors 2017-07-07 10:33:04 -07:00
Carl Lerche
fee43a09c8 Fix warnings 2017-06-27 12:23:57 -07:00
Carl Lerche
e2871d92fa Work 2017-03-10 13:02:04 -08:00