pub struct ServerActorTask { /* 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
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 new() -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn new() -> Self
Creates a new default ServerActorTask
.
Sourcepub async fn close(self)
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub async fn close(self)
Closes the server and waits for the connections to disconnect.
Sourcepub fn abort(&self)
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn abort(&self)
Aborts the server.
You should prefer to use ServerActorTask::close
for a graceful shutdown.
Sourcepub fn is_closed(&self) -> bool
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn is_closed(&self) -> bool
Whether or not the relay ServerActorTask
is closed.
Sourcepub fn client_conn_handler(
&self,
default_headers: HeaderMap,
) -> ClientConnHandler
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
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