pub struct ServerActorTask { /* private fields */ }
Available on crate feature
iroh-relay
only.Expand description
The task for a running server actor.
Will forcefully abort the server actor loop when dropped.
For stopping gracefully, use ServerActorTask::close
.
Responsible for managing connections to relay Conn
s, sending packets from one client to another.
Implementations§
Source§impl ServerActorTask
impl ServerActorTask
Sourcepub fn abort(&self)
pub fn abort(&self)
Aborts the server.
You should prefer to use ServerActorTask::close
for a graceful shutdown.
Sourcepub fn is_closed(&self) -> bool
pub fn is_closed(&self) -> bool
Whether or not the relay ServerActorTask
is closed.
Sourcepub fn client_conn_handler(
&self,
default_headers: HeaderMap,
) -> ClientConnHandler
pub fn client_conn_handler( &self, default_headers: HeaderMap, ) -> ClientConnHandler
Create a ClientConnHandler
, which can verify connections and add them to the
ServerActorTask
.
Trait Implementations§
Source§impl Debug for ServerActorTask
impl Debug for ServerActorTask
Auto Trait Implementations§
impl Freeze for ServerActorTask
impl RefUnwindSafe for ServerActorTask
impl Send for ServerActorTask
impl Sync for ServerActorTask
impl Unpin for ServerActorTask
impl UnwindSafe for ServerActorTask
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