[][src]Struct rocket::http::hyper::Server

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> Server<L> where
    L: NetworkListener
[src]

Creates a new server with the provided handler.

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.

impl Server<HttpListener>
[src]

Creates a new server that will handle HttpStreams.

impl<S> Server<HttpsListener<S>> where
    S: SslServer<HttpStream> + Send + Clone
[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> Server<L> where
    L: 'static + NetworkListener + Send
[src]

Binds to a socket and starts handling connections.

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

Trait Implementations

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

Auto Trait Implementations

impl<L> Send for Server<L> where
    L: Send

impl<L> Sync for Server<L> where
    L: Sync

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Typeable for T where
    T: Any

Get the TypeId of this object.

impl<T> IntoCollection for T

impl<T, I> AsResult for T where
    I: Input,