[−][src]Struct parity_tokio_ipc::Endpoint
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. }
Methods
impl Endpoint
[src]
pub fn incoming(self, handle: &Handle) -> Result<Incoming>
[src]
Stream of incoming connections
pub fn set_security_attributes(
&mut self,
security_attributes: SecurityAttributes
)
[src]
&mut self,
security_attributes: SecurityAttributes
)
Set security attributes for the connection
pub fn path(&self) -> &str
[src]
Returns the path of the endpoint.
pub fn new(path: String) -> Self
[src]
New IPC endpoint at the given path
Auto Trait Implementations
impl Send for Endpoint
impl !Sync for Endpoint
impl Unpin for Endpoint
impl UnwindSafe for Endpoint
impl RefUnwindSafe for Endpoint
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,