Struct socket_io::server::Server
[−]
[src]
pub struct Server { /* fields omitted */ }
Methods
impl Server
[src]
fn from_server(server: Server) -> Server
Returns a socket.io Server
instance from an engine.io Server
instance.
fn new() -> Server
fn on_connection<F>(&self, f: F) where F: Fn(Socket) + 'static
Set callback to be called on connecting to a new client.
fn close(&mut self)
Close connection to all clients.
fn emit(&self, event: Value, params: Option<Vec<Data>>)
Emits an event with the value event
and parameters
params
to all connected clients.
Trait Implementations
impl Clone for Server
[src]
fn clone(&self) -> Server
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Send for Server
[src]
impl Sync for Server
[src]
impl Handler for Server
[src]
fn handle(&self, req: &mut Request) -> IronResult<Response>
Produce a Response
from a Request, with the possibility of error.