Struct rux::server::simplemux::SimpleMux
[−]
[src]
pub struct SimpleMux<P: IOProtocol> { /* fields omitted */ }
Simple server implementation that creates one AF_INET/SOCK_STREAM socket and uses it to bind/listen at the specified address. It instantiates one epoll to accept new connections and one instance per cpu left to perform I/O.
TODO rename to something more interesting TODO think about how to support request pipelining
Events are handled synchronously TODO explain why useful for RPC or protocols that support request/message pipelining
New connections are load balanced from the connections epoll to the rest in a round-robin fashion.
Methods
impl<P> SimpleMux<P> where
P: IOProtocol,
[src]
P: IOProtocol,
fn new(config: SimpleMuxConfig, protocol: P) -> Result<SimpleMux<P>>
Trait Implementations
impl<P> Handler<EpollEvent> for SimpleMux<P> where
P: IOProtocol,
[src]
P: IOProtocol,
fn is_terminated(&self) -> bool
fn ready(&mut self, _: &EpollEvent)
impl<P> ServerImpl for SimpleMux<P> where
P: IOProtocol + 'static,
[src]
P: IOProtocol + 'static,
impl<P> Drop for SimpleMux<P> where
P: IOProtocol,
[src]
P: IOProtocol,