Struct quicr::Endpoint [−][src]
pub struct Endpoint(_);
A QUIC endpoint.
An endpoint corresponds to a single UDP socket, may host many connections, and may act as both client and server for different connections.
Methods
impl Endpoint
[src]
impl Endpoint
pub fn new<'a>() -> EndpointBuilder<'a>
[src]
pub fn new<'a>() -> EndpointBuilder<'a>
Begin constructing an Endpoint
pub fn connect(
&self,
addr: &SocketAddr,
config: ClientConfig
) -> Result<impl Future<Item = NewClientConnection, Error = ConnectionError>, ConnectError>
[src]
pub fn connect(
&self,
addr: &SocketAddr,
config: ClientConfig
) -> Result<impl Future<Item = NewClientConnection, Error = ConnectionError>, ConnectError>
Connect to a remote endpoint.
May fail immediately due to configuration errors, or in the future if the connection could not be established.
pub fn connect_zero_rtt(
&self,
addr: &SocketAddr,
config: ClientConfig
) -> Result<(NewClientConnection, impl Future<Item = (), Error = ConnectionError>), ConnectError>
[src]
pub fn connect_zero_rtt(
&self,
addr: &SocketAddr,
config: ClientConfig
) -> Result<(NewClientConnection, impl Future<Item = (), Error = ConnectionError>), ConnectError>
Connect to a remote endpoint, with support for transmitting data before the connection is established
Returns a connection that may be used for sending immediately, and a future that will complete when the connection is established.
Data transmitted this way may be replayed by an attacker until the session ticket expires. Never send non-idempotent commands as 0-RTT data.
Servers may reject 0-RTT data, in which case anything sent will be retransmitted after the connection is established.
Panics
- If
config.session_ticket
isNone
. A session ticket is necessary for 0-RTT to be possible.