pub struct QuicEndpoint {
inner: Endpoint,
local_endpoint: Endpoint,
}Expand description
A QUIC endpoint that can listen for and initiate connections.
Fields§
§inner: Endpoint§local_endpoint: EndpointImplementations§
Source§impl QuicEndpoint
impl QuicEndpoint
Sourcepub async fn listen(
endpoint: &Endpoint,
config: ServerQuicConfig,
) -> Result<Self>
pub async fn listen( endpoint: &Endpoint, config: ServerQuicConfig, ) -> Result<Self>
Bind to a local address and start listening with the given server config.
Sourcepub async fn dial(
endpoint: &Endpoint,
config: ClientQuicConfig,
) -> Result<QuicConn>
pub async fn dial( endpoint: &Endpoint, config: ClientQuicConfig, ) -> Result<QuicConn>
Connect to a remote QUIC endpoint.
Sourcepub fn local_endpoint(&self) -> Result<Endpoint>
pub fn local_endpoint(&self) -> Result<Endpoint>
Returns the local endpoint.
Auto Trait Implementations§
impl Freeze for QuicEndpoint
impl !RefUnwindSafe for QuicEndpoint
impl Send for QuicEndpoint
impl Sync for QuicEndpoint
impl Unpin for QuicEndpoint
impl UnsafeUnpin for QuicEndpoint
impl !UnwindSafe for QuicEndpoint
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