Struct xcore::Executor
[−]
[src]
pub struct Executor { /* fields omitted */ }
Executor to manage socket poll and execute response to handle message
Methods
impl Executor
[src]
fn new<T>(
maxconn: i32,
threadnum: usize,
handler: fn(_: i32, _: &mut TcpStream, _: Sender<Ctrl>, _: Arc<RwLock<T>>),
data: T
) -> Self where
T: 'static + Send + Sync,
maxconn: i32,
threadnum: usize,
handler: fn(_: i32, _: &mut TcpStream, _: Sender<Ctrl>, _: Arc<RwLock<T>>),
data: T
) -> Self where
T: 'static + Send + Sync,
fn add(&self, sock: TcpStream)
Add socket to epoll list
fn remove(&self, sock: TcpStream)
Remove socket from epoll listener
fn shutwodn(&self)
Shutdown executor