Struct wtransport::endpoint::SessionRequest
source · pub struct SessionRequest { /* private fields */ }
Expand description
Implementations§
source§impl SessionRequest
impl SessionRequest
sourcepub fn remote_address(&self) -> SocketAddr
pub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
Note: as QUIC supports migration, remote address may change during connection. Furthermore, when IPv6 support is enabled, IPv4 addresses may be mapped to IPv6.
Returns the :authority
field of the request.
sourcepub fn user_agent(&self) -> Option<&str>
pub fn user_agent(&self) -> Option<&str>
Returns the user-agent
field of the request if present.
sourcepub fn headers(&self) -> &HashMap<String, String>
pub fn headers(&self) -> &HashMap<String, String>
Returns all header fields associated with the request.
sourcepub async fn accept(self) -> Result<Connection, ConnectionError>
pub async fn accept(self) -> Result<Connection, ConnectionError>
Accepts the client request and it establishes the WebTransport session.
sourcepub async fn too_many_requests(self)
pub async fn too_many_requests(self)
Rejects the client request by replying with 429
status code.
Auto Trait Implementations§
impl !Freeze for SessionRequest
impl !RefUnwindSafe for SessionRequest
impl Send for SessionRequest
impl Sync for SessionRequest
impl Unpin for SessionRequest
impl !UnwindSafe for SessionRequest
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§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