Struct hyper::server::Server [−][src]
pub struct Server<L = HttpListener> { /* fields omitted */ }
Expand description
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.
Implementations
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.
Sets the read timeout for all Request reads.
Sets the write timeout for all Response writes.
Get the address that the server is listening on.
Creates a new server that will handle HttpStream
s.
Creates a new server that will handle HttpStream
s over SSL.
You can use any SSL implementation, as long as implements hyper::net::Ssl
.
Binds to a socket and starts handling connections.