pub struct Acceptor { /* private fields */ }Expand description
A QUIC server-side acceptor.
Acceptor allows callers to choose a ServerConfig after reading the
ClientHello of an incoming QUIC connection.
Implementations§
Source§impl Acceptor
impl Acceptor
Sourcepub fn read_hs(&mut self, plaintext: &[u8]) -> Result<(), Error>
pub fn read_hs(&mut self, plaintext: &[u8]) -> Result<(), Error>
Consume unencrypted TLS handshake data.
The plaintext should be ordered QUIC CRYPTO stream data for one encryption level.
Handshake data obtained from separate encryption levels should be supplied in separate calls.
Sourcepub fn accept(&mut self) -> Result<Option<Accepted>, Error>
pub fn accept(&mut self) -> Result<Option<Accepted>, Error>
Check if a ClientHello message has been received.
Returns Ok(None) if the complete ClientHello has not yet been received.
Supply more handshake data with Acceptor::read_hs() and call this function again.
Returns Ok(Some(accepted)) if the connection has been accepted. Call
Accepted::into_connection() to continue. Do not call this function again.
Auto Trait Implementations§
impl !RefUnwindSafe for Acceptor
impl !UnwindSafe for Acceptor
impl Freeze for Acceptor
impl Send for Acceptor
impl Sync for Acceptor
impl Unpin for Acceptor
impl UnsafeUnpin for Acceptor
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