fn wrap_socket<P>(socket: TcpStream, max_length: usize) -> TcpChan<P>
where
    P: Session,
{
    let (rx, tx) = socket.into_split();
    let (tx, rx) = dialectic_tokio_serde_bincode::length_delimited(tx, rx, 4, max_length);
    P::wrap(tx, rx)
}
/// Wrap a raw TCP socket in a given session type, using the length delimited bincode transport
/// format/encoding.
Wrap a raw TCP socket in a given session type, using the length delimited bincode transport
format/encoding.
Wrap a raw TCP socket in a given session type using the length delimited bincode transport format / encoding .
fn wrap_socket<P>(socket: TcpStream, max_length: usize) -> TcpChan<P>
where
    P: Session,
{
    let (rx, tx) = socket.into_split();
    let (tx, rx) = dialectic_tokio_serde_bincode::length_delimited(tx, rx, 4, max_length);
    P::wrap(tx, rx)
}
fn wrap_socket < P > ( socket : TcpStream , max_length : usize ) -> TcpChan < P > where P : Session , { let ( rx , tx ) = socket . into_split ( ) ; let ( tx , rx ) = dialectic_tokio_serde_bincode :: length_delimited ( tx , rx , 4 , max_length ) ; P :: wrap ( tx , rx ) }
Wrap a raw TCP socket in a given session type, using the length delimited bincode transport
format/encoding.
Wrap a raw TCP socket in a given session type using the length delimited bincode transport format / encoding .
socket
TcpStream
max_length
usize