pub struct Incoming { /* private fields */ }Expand description
An incoming connection for which the server has not yet begun its parts of the handshake.
Implementations§
Source§impl Incoming
impl Incoming
Sourcepub fn accept(self) -> Result<Accepting, ConnectionError>
pub fn accept(self) -> Result<Accepting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC connection listens on a normal UDP socket and any reachable network endpoint can send datagrams to it, solicited or not. Even if the first few bytes look like a QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which can happen.
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Accepting, ConnectionError>
pub fn accept_with( self, server_config: Arc<ServerConfig>, ) -> Result<Accepting, ConnectionError>
Accepts this incoming connection using a custom configuration.
Use the Endpoint::create_server_config_builder method to create a ServerConfigBuilder
to customize a ServerConfig.
See accept() for more details.
Sourcepub fn retry(self) -> Result<(), RetryError>
pub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
Sourcepub fn ignore(self)
pub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
Sourcepub fn local_addr(&self) -> LocalTransportAddr
pub fn local_addr(&self) -> LocalTransportAddr
Returns the local address that received this incoming connection.
Sourcepub fn remote_addr(&self) -> IncomingAddr
pub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this incoming connection.
Sourcepub fn remote_addr_validated(&self) -> bool
pub fn remote_addr_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_addr().
Sourcepub fn decrypt(&self) -> Option<DecryptedInitial>
pub fn decrypt(&self) -> Option<DecryptedInitial>
Decrypts the Initial packet payload.
This clones and decrypts the packet payload (~1200 bytes). Can be used to extract information from the TLS ClientHello without completing the handshake.
Trait Implementations§
Source§impl IntoFuture for Incoming
impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectingError>
type Output = Result<Connection, ConnectingError>
Source§type IntoFuture = IncomingFuture
type IntoFuture = IncomingFuture
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Auto Trait Implementations§
impl !Freeze for Incoming
impl !RefUnwindSafe for Incoming
impl Send for Incoming
impl Sync for Incoming
impl Unpin for Incoming
impl !UnwindSafe for Incoming
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more