pub struct ConnectionHandler { /* private fields */ }Expand description
Handler for an individual QUIC connection
Implementations§
Source§impl ConnectionHandler
impl ConnectionHandler
pub fn new(connection: Connection) -> Self
Sourcepub fn remote_address(&self) -> SocketAddr
pub fn remote_address(&self) -> SocketAddr
Get the remote address of the connection
Sourcepub async fn accept_bi(&self) -> Result<(SendStream, RecvStream), ServerError>
pub async fn accept_bi(&self) -> Result<(SendStream, RecvStream), ServerError>
Accept the next bidirectional stream
Sourcepub async fn accept_uni(&self) -> Result<RecvStream, ServerError>
pub async fn accept_uni(&self) -> Result<RecvStream, ServerError>
Accept the next unidirectional stream (for receiving)
Sourcepub async fn open_bi(&self) -> Result<(SendStream, RecvStream), ServerError>
pub async fn open_bi(&self) -> Result<(SendStream, RecvStream), ServerError>
Open a bidirectional stream
Sourcepub async fn open_uni(&self) -> Result<SendStream, ServerError>
pub async fn open_uni(&self) -> Result<SendStream, ServerError>
Open a unidirectional stream (for sending)
Auto Trait Implementations§
impl Freeze for ConnectionHandler
impl RefUnwindSafe for ConnectionHandler
impl Send for ConnectionHandler
impl Sync for ConnectionHandler
impl Unpin for ConnectionHandler
impl UnwindSafe for ConnectionHandler
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