pub trait TransportListenerSender: GhostChannelSender<TransportListener> {
fn debug(&self) -> TransportListenerFuture<Value> { ... }
fn bound_url(&self) -> TransportListenerFuture<Url2> { ... }
fn create_channel(
&self,
url: Url2
) -> TransportListenerFuture<(Url2, TransportChannelWrite, TransportChannelRead)> { ... }
}
Expand description
Represents a transport binding for establishing connections. This api was designed mainly around supporting the QUIC transport. It should be applicable to other transports, but with some assumptions:
- Keep alive logic should be handled internally.
- Transport encryption is handled internally.
- See light-weight comments below on
create_channel
api.
Provided methods
fn debug(&self) -> TransportListenerFuture<Value>
fn debug(&self) -> TransportListenerFuture<Value>
Grab a debugging internal state dump.
fn bound_url(&self) -> TransportListenerFuture<Url2>
fn bound_url(&self) -> TransportListenerFuture<Url2>
Retrieve the current url (address) this listener is bound to.
fn create_channel(
&self,
url: Url2
) -> TransportListenerFuture<(Url2, TransportChannelWrite, TransportChannelRead)>
fn create_channel(
&self,
url: Url2
) -> TransportListenerFuture<(Url2, TransportChannelWrite, TransportChannelRead)>
Attempt to establish an outgoing channel to a remote. Channels are expected to be very light-weight. This API was designed around QUIC bi-streams. If your low-level channels are not light-weight, consider implementing pooling/multiplex virtual channels to make this api light weight.