pub trait SessionSocketExt:
AsyncRead
+ AsyncWrite
+ Send
+ Unpin {
// Provided methods
fn reliable_session<const MTU: usize>(
self,
ack: AcknowledgementState<MTU>,
cfg: SessionSocketConfig,
) -> Result<ReliableSocket<MTU>>
where Self: Sized + 'static { ... }
fn unreliable_session<const MTU: usize>(
self,
id: &str,
cfg: SessionSocketConfig,
) -> Result<UnreliableSocket<MTU>>
where Self: Sized + 'static { ... }
}
Expand description
Adaptors for [futures::io::AsyncRead
] + [futures::io::AsyncWrite
] transport to use Session protocol.
Use compat
first when the underlying transport is Tokio-based.
Provided Methods§
Sourcefn reliable_session<const MTU: usize>(
self,
ack: AcknowledgementState<MTU>,
cfg: SessionSocketConfig,
) -> Result<ReliableSocket<MTU>>where
Self: Sized + 'static,
fn reliable_session<const MTU: usize>(
self,
ack: AcknowledgementState<MTU>,
cfg: SessionSocketConfig,
) -> Result<ReliableSocket<MTU>>where
Self: Sized + 'static,
Runs a reliable Session protocol on self.
Sourcefn unreliable_session<const MTU: usize>(
self,
id: &str,
cfg: SessionSocketConfig,
) -> Result<UnreliableSocket<MTU>>where
Self: Sized + 'static,
fn unreliable_session<const MTU: usize>(
self,
id: &str,
cfg: SessionSocketConfig,
) -> Result<UnreliableSocket<MTU>>where
Self: Sized + 'static,
Runs unreliable Session protocol on self.