Struct httpbis::ServerBuilder[][src]

pub struct ServerBuilder<A: TlsAcceptor = TlsAcceptor> {
    pub conf: ServerConf,
    pub cpu_pool: CpuPoolOption,
    pub tls: ServerTlsOption<A>,
    pub addr: Option<AnySocketAddr>,
    pub event_loop: Option<Remote>,
    pub service: ServicePaths,
}

Fields

Event loop to spawn server. If not specified, builder will create new event loop in a new thread.

Methods

impl ServerBuilder<TlsAcceptor>
[src]

New server builder with defaults.

Port must be set, other properties are optional.

impl ServerBuilder<TlsAcceptor>
[src]

New unix domain socket server with defaults

Addr must be set, other properties are optional.

impl<A: TlsAcceptor> ServerBuilder<A>
[src]

Set port server listens on. Can be zero to bind on any available port, which can be later obtained by Server::local_addr.

Set port server listens on.

impl<A: TlsAcceptor> ServerBuilder<A>
[src]

impl<A: TlsAcceptor> ServerBuilder<A>
[src]

New server builder with defaults.

To call this function ServerBuilder must be parameterized with TLS acceptor. If TLS is not needed, ServerBuilder::new_plain function can be used.

Port must be set, other properties are optional.

Create a CPU pool, and use it in HTTP server

Auto Trait Implementations

impl<A> Send for ServerBuilder<A>

impl<A> Sync for ServerBuilder<A>