Struct parity_tokio_ipc::Endpoint
source · [−]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
sourceimpl Endpoint
impl Endpoint
sourcepub fn set_security_attributes(
&mut self,
security_attributes: SecurityAttributes
)
pub fn set_security_attributes(
&mut self,
security_attributes: SecurityAttributes
)
Set security attributes for the connection
Auto Trait Implementations
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnwindSafe for Endpoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more