Struct tiny_http::Server [] [src]

pub struct Server { /* fields omitted */ }

The main class of this library.

Destroying this object will immediatly close the listening socket annd the reading part of all the client's connections. Requests that have already been returned by the recv() function will not close and the responses will be transferred to the client.

Methods

impl Server
[src]

Shortcut for a simple server on a specific address.

Builds a new server that listens on the specified address.

Returns an iterator for all the incoming requests.

The iterator will return None if the server socket is shutdown.

Returns the address the server is listening to.

Returns the number of clients currently connected to the server.

Blocks until an HTTP request has been submitted and returns it.

Same as recv() but doesn't block longer than timeout

Same as recv() but doesn't block.

Trait Implementations

impl Drop for Server
[src]

A method called when the value goes out of scope. Read more