pub struct Endpoint { /* private fields */ }
Expand description
Endpoint for IPC transport
§Examples
ⓘ
use parity_tokio_ipc::{Endpoint, dummy_endpoint};
use futures::{future, Future, Stream, StreamExt};
use tokio::runtime::Runtime;
fn main() {
let mut runtime = Runtime::new().unwrap();
let mut endpoint = Endpoint::new(dummy_endpoint());
let server = endpoint.incoming()
.expect("failed to open up a new pipe/socket")
.for_each(|_stream| {
println!("Connection received");
futures::future::ready(())
});
runtime.block_on(server)
}
Endpoint implementation for windows
Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub fn incoming(
self,
) -> Result<impl Stream<Item = Result<impl AsyncRead + AsyncWrite>> + 'static>
pub fn incoming( self, ) -> Result<impl Stream<Item = Result<impl AsyncRead + AsyncWrite>> + 'static>
Stream of incoming connections
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 Freeze for Endpoint
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl !Sync for Endpoint
impl Unpin for Endpoint
impl UnwindSafe for Endpoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more