Struct engine_io::config::Config
[−]
[src]
pub struct Config { pub ping_timeout: Duration, pub ping_interval: Duration, pub cookie: Option<String>, pub cookie_path: Option<String>, pub generate_id: Arc<Box<Fn(&Request) -> String>>, }
Fields
ping_timeout: Duration
Duration before a pong packet after which to consider the connection closed (60 seconds)
ping_interval: Duration
Duration to wait before sending a new ping packet (25 seconds)
Name of the HTTP cookie that contains the client sid to send as part
of handshake response headers. Set to None
to send a cookie.
Path of the above cookie option. If None
, no path will be sent, which
means browsers will only send the cookie on the engine.io attached path
(Some("/engine.io")
). Set this to Some("/")
to send the io cookie
on all requests. (None
)
generate_id: Arc<Box<Fn(&Request) -> String>>
Generate a socket id. Takes an Iron Request
, and returns the id String.
Default value is generate_id