[−][src]Struct susy_tokio_ipc::Endpoint
Endpoint for IPC transport
Examples
extern crate tokio; extern crate futures; extern crate susy_tokio_ipc; use susy_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
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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.