pub struct JaxProtocol { /* private fields */ }Expand description
Protocol handler for the JAX protocol
Accepts incoming connections and handles ping requests
Implementations§
Source§impl JaxProtocol
impl JaxProtocol
Sourcepub fn new(state: Arc<dyn BucketStateProvider>) -> Self
pub fn new(state: Arc<dyn BucketStateProvider>) -> Self
Create a new JAX protocol handler with the given state provider
Sourcepub fn handle_connection(
self,
conn: Connection,
) -> BoxFuture<'static, Result<(), AcceptError>>
pub fn handle_connection( self, conn: Connection, ) -> BoxFuture<'static, Result<(), AcceptError>>
Handle an incoming connection
This is called by the iroh router for each incoming connection with the JAX ALPN.
Trait Implementations§
Source§impl Clone for JaxProtocol
impl Clone for JaxProtocol
Source§fn clone(&self) -> JaxProtocol
fn clone(&self) -> JaxProtocol
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JaxProtocol
impl Debug for JaxProtocol
Source§impl ProtocolHandler for JaxProtocol
impl ProtocolHandler for JaxProtocol
Source§fn accept(
&self,
conn: Connection,
) -> BoxFuture<'static, Result<(), AcceptError>>
fn accept( &self, conn: Connection, ) -> BoxFuture<'static, Result<(), AcceptError>>
Handle an incoming connection. Read more
Source§fn on_connecting(
&self,
connecting: Connecting,
) -> impl Future<Output = Result<Connection, AcceptError>> + Send
fn on_connecting( &self, connecting: Connecting, ) -> impl Future<Output = Result<Connection, AcceptError>> + Send
Optional interception point to handle the
Connecting state. Read moreAuto Trait Implementations§
impl Freeze for JaxProtocol
impl !RefUnwindSafe for JaxProtocol
impl Send for JaxProtocol
impl Sync for JaxProtocol
impl Unpin for JaxProtocol
impl !UnwindSafe for JaxProtocol
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