This makes the API more similar to hyper 0.12. Specifically, it allows the user
to use server::Http::serve_* for more fine-grained handling of
incoming connections. The existing server::Server::run still exists to allow
an easy way of synchronously starting up a server on a new tokio runtime.
Other changes:
Fix and enable doctests on Server and Http.
Fix server example to delete the socket if it exists before binding to it,
so that it can be run more than once.
Note that this has semver-major breaking changes. Http::bind is now Server::bind (similar to hyper::Server), Server::local_addr always succeeds, and some of the generic bounds are different.
This makes the API more similar to hyper 0.12. Specifically, it allows the user to use
server::Http::serve_*
for more fine-grained handling of incoming connections. The existingserver::Server::run
still exists to allow an easy way of synchronously starting up a server on a new tokio runtime.Other changes:
Fix and enable doctests on Server and Http.
Fix server example to delete the socket if it exists before binding to it, so that it can be run more than once.
Note that this has semver-major breaking changes.
Http::bind
is nowServer::bind
(similar tohyper::Server
),Server::local_addr
always succeeds, and some of the generic bounds are different.