pub struct ConnQueue {
queue: Mutex<VecDeque<QueuedConn>>,
conn_available: CondVar,
}Expand description
FIFO of pending connections awaiting handshake.
Fields§
§queue: Mutex<VecDeque<QueuedConn>>§conn_available: CondVarImplementations§
Source§impl ConnQueue
impl ConnQueue
pub fn new() -> Arc<Self>
Sourcepub async fn handle(
&self,
conn: FramedConn<PeerNetMsgCodec>,
direction: ConnDirection,
verified_peer_id: Option<PeerID>,
) -> Result<()>
pub async fn handle( &self, conn: FramedConn<PeerNetMsgCodec>, direction: ConnDirection, verified_peer_id: Option<PeerID>, ) -> Result<()>
Handle a stream connection: split into halves, push, and block until disconnect.
Sourcepub async fn handle_quic(
&self,
conn: FramedConn<PeerNetMsgCodec>,
quic_conn: QuicConn,
direction: ConnDirection,
verified_peer_id: Option<PeerID>,
) -> Result<()>
pub async fn handle_quic( &self, conn: FramedConn<PeerNetMsgCodec>, quic_conn: QuicConn, direction: ConnDirection, verified_peer_id: Option<PeerID>, ) -> Result<()>
Handle a QUIC connection. The conn is the handshake stream;
quic_conn is the full QUIC connection for protocol streams.
Sourcepub async fn next(&self) -> QueuedConn
pub async fn next(&self) -> QueuedConn
Waits for the next connection in the queue.
Auto Trait Implementations§
impl !Freeze for ConnQueue
impl !RefUnwindSafe for ConnQueue
impl Send for ConnQueue
impl Sync for ConnQueue
impl Unpin for ConnQueue
impl UnsafeUnpin for ConnQueue
impl UnwindSafe for ConnQueue
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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