Struct hyper::server::Server [] [src]

pub struct Server<L = HttpListener> { /* fields omitted */ }

A server can listen on a TCP socket.

Once listening, it will create a Request/Response pair for each incoming connection, and hand them to the provided handler.

Methods

impl<L: NetworkListener> Server<L>
[src]

[src]

Creates a new server with the provided handler.

[src]

Controls keep-alive for this server.

The timeout duration passed will be used to determine how long to keep the connection alive before dropping it.

Passing None will disable keep-alive.

Default is enabled with a 5 second timeout.

[src]

Sets the read timeout for all Request reads.

[src]

Sets the write timeout for all Response writes.

[src]

Get the address that the server is listening on.

impl Server<HttpListener>
[src]

[src]

Creates a new server that will handle HttpStreams.

impl<S: SslServer + Clone + Send> Server<HttpsListener<S>>
[src]

[src]

Creates a new server that will handle HttpStreams over SSL.

You can use any SSL implementation, as long as implements hyper::net::Ssl.

impl<L: NetworkListener + Send + 'static> Server<L>
[src]

[src]

Binds to a socket and starts handling connections.

[src]

Binds to a socket and starts handling connections with the provided number of threads.

Trait Implementations

impl<L: Debug> Debug for Server<L>
[src]

[src]

Formats the value using the given formatter. Read more