pub struct Endpoint { /* private fields */ }
Expand description

Endpoint for IPC transport

Examples

extern crate tokio;
extern crate futures;
extern crate parity_tokio_ipc;

use parity_tokio_ipc::{Endpoint, dummy_endpoint};
use futures::{future, Future, Stream};

fn main() {
    let runtime = tokio::runtime::Runtime::new()
        .expect("Error creating tokio runtime");
    let handle = runtime.reactor();
    let endpoint = Endpoint::new(dummy_endpoint());
    let server = endpoint.incoming(handle)
        .expect("failed to open up a new pipe/socket")
        .for_each(|(_stream, _remote_id)| {
            println!("Connection received");
            future::ok(())
        })
        .map_err(|err| panic!("Endpoint connection error: {:?}", err));
    // ... run server etc.
}

Implementations

Stream of incoming connections

Set security attributes for the connection

Returns the path of the endpoint.

New IPC endpoint at the given path

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.