pub struct ClientConnHandler { /* private fields */ }
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
Available on crate feature
iroh-relay
only.Expand description
Handle incoming connections to the Server.
Created by the ServerActorTask
by calling ServerActorTask::client_conn_handler
.
Can be cheaply cloned.
Implementations§
Source§impl ClientConnHandler
impl ClientConnHandler
Sourcepub async fn accept(&self, protocol: Protocol, io: MaybeTlsStream) -> Result<()>
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub async fn accept(&self, protocol: Protocol, io: MaybeTlsStream) -> Result<()>
Adds a new connection to the server and serves it.
Will error if it takes too long (10 sec) to write or read to the connection, if there is some read or write error to the connection, if the server is meant to verify clients, and is unable to verify this one, or if there is some issue communicating with the server.
The provided AsyncRead
and AsyncWrite
must be already connected to the connection.
Trait Implementations§
Source§impl Clone for ClientConnHandler
impl Clone for ClientConnHandler
Source§impl Debug for ClientConnHandler
impl Debug for ClientConnHandler
Auto Trait Implementations§
impl Freeze for ClientConnHandler
impl RefUnwindSafe for ClientConnHandler
impl Send for ClientConnHandler
impl Sync for ClientConnHandler
impl Unpin for ClientConnHandler
impl UnwindSafe for ClientConnHandler
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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