Struct ethcore_io::IoService [−][src]
General IO Service. Starts an event loop and dispatches IO requests. 'Message' is a notification message type
Methods
impl<Message> IoService<Message> where
Message: Send + Sync + 'static,
[src]
impl<Message> IoService<Message> where
Message: Send + Sync + 'static,
pub fn start() -> Result<IoService<Message>, IoError>
[src]
pub fn start() -> Result<IoService<Message>, IoError>
Starts IO event loop
pub fn stop(&self)
[src]
pub fn stop(&self)
Stops the IO service.
pub fn register_handler(
&self,
handler: Arc<IoHandler<Message> + Send>
) -> Result<(), IoError>
[src]
pub fn register_handler(
&self,
handler: Arc<IoHandler<Message> + Send>
) -> Result<(), IoError>
Register an IO handler with the event loop.
pub fn send_message(&self, message: Message) -> Result<(), IoError>
[src]
pub fn send_message(&self, message: Message) -> Result<(), IoError>
Send a message over the network. Normaly HostIo::send
should be used. This can be used from non-io threads.
pub fn channel(&self) -> IoChannel<Message>
[src]
pub fn channel(&self) -> IoChannel<Message>
Create a new message channel