Struct connect::Server [−][src]
pub struct Server<I, R, W> where
I: Fn(Bytes) -> MessageType + Send + Sync + 'static,
R: Fn(Bytes) -> Bytes + Send + Sync + 'static,
W: Fn(Bytes) -> Bytes + Send + Sync + 'static, { /* fields omitted */ }
This struct represents connect framework's server.
Methods
impl<I, R, W> Server<I, R, W> where
I: Fn(Bytes) -> MessageType + Send + Sync + 'static,
R: Fn(Bytes) -> Bytes + Send + Sync + 'static,
W: Fn(Bytes) -> Bytes + Send + Sync + 'static,
[src]
impl<I, R, W> Server<I, R, W> where
I: Fn(Bytes) -> MessageType + Send + Sync + 'static,
R: Fn(Bytes) -> Bytes + Send + Sync + 'static,
W: Fn(Bytes) -> Bytes + Send + Sync + 'static,
pub fn new(
cluster: Cluster,
incoming: I,
on_read: R,
on_write: W,
service_type: ServiceType
) -> Server<I, R, W>
[src]
pub fn new(
cluster: Cluster,
incoming: I,
on_read: R,
on_write: W,
service_type: ServiceType
) -> Server<I, R, W>
Creates a new instance of Server
pub fn run(&self) -> Vec<JoinHandle<()>>
[src]
pub fn run(&self) -> Vec<JoinHandle<()>>
Runs this server