# Struct ethcore_io::IoService [−] [src]

    pub struct IoService<Message> where Message: Send + Sync + Clone + 'static { /* fields omitted */ }

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 + Clone + 'static`
[src]

#### `fn start() -> Result<IoService<Message>, IoError>`

Starts IO event loop

#### `fn stop(&self)`

#### `fn register_handler(&self,
handler: Arc<IoHandler<Message> + Send>)
-> Result<(), IoError>`

Regiter an IO handler with the event loop.

#### `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.

#### `fn channel(&self) -> IoChannel<Message>`

Create a new message channel

## Trait Implementations

### `impl<Message> MayPanic for IoService<Message> where Message: Send + Sync + Clone + 'static`
[src]

#### `fn on_panic<F>(&self, closure: F) where F: OnPanicListener`

`closure` will be invoked whenever panic in thread is caught

### `impl<Message> Drop for IoService<Message> where Message: Send + Sync + Clone`
[src]

#### `fn drop(&mut self)`

A method called when the value goes out of scope. Read more

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)