Commit Graph

157 Commits

Author SHA1 Message Date
Jonathan Reem
ce61781cbd Added example of a concurrent server
Simple example that demonstrates how to create a concurrent
server on top of the primitives exposed by hyper.
2014-09-08 18:24:55 -07:00
Jonathan Reem
13bb07e02d Updated examples and benchmarks for new Response representation. 2014-09-08 16:52:27 -07:00
Jonathan Reem
872dcf758c Statically track the status of a Response by using a Phantom Type
Introduces two Phantom Types, Fresh and Streaming, which indicate the status
of a Response.

Response::start translates an Response<Fresh> into a
Response<Streaming> by writing the StatusCode and Headers.

Response<Fresh> allows modification of Headers and StatusCode, but does
not allow writing to the body. Response<Streaming> has the opposite privileges.
2014-09-08 16:52:24 -07:00
Jonathan Reem
f2c09c5743 Split common headers into a submodule and into their own files
This is a more extensible place to put them and doesn't clutter up
header/mod.rs as much as the old scheme did.

Fixes #8
2014-09-08 16:20:50 -07:00
Jonathan Reem
3fbf3040cd Updated example for new Handler trait
This introduces a bit of complexity to the example,
mainly the use of the try_continue! macro for dealing
with errors, but I think this is an appropriate trade-off
as users of this library are likely to be framework authors
instead of end users.
2014-09-07 09:37:53 +02:00
Sean McArthur
818fac4128 add some benches with other http libs 2014-09-02 12:06:16 -07:00
Sean McArthur
c905111f8c implementation 2014-09-01 18:39:24 -07:00