pub fn session_channel<P: HasDual, R>() -> ChanPair<P, R> {
    let (tx1, rx1) = unbounded_channel();
    let (tx2, rx2) = unbounded_channel();

    let c1 = Chan::new(tx1, rx2);
    let c2 = Chan::new(tx2, rx1);

    (c1, c2)
}
/// Create a pair of server and client channels for a given protocol `P`.
Create a pair of server and client channels for a given protocol `P`.
Create a pair of server and client channels for a given protocol ` P ` .
pub fn session_channel<P: HasDual, R>() -> ChanPair<P, R> {
    let (tx1, rx1) = unbounded_channel();
    let (tx2, rx2) = unbounded_channel();
    let c1 = Chan::new(tx1, rx2);
    let c2 = Chan::new(tx2, rx1);
    (c1, c2)
}
pub fn session_channel < P : HasDual , R > ( ) -> ChanPair < P , R > { let ( tx1 , rx1 ) = unbounded_channel ( ) ; let ( tx2 , rx2 ) = unbounded_channel ( ) ; let c1 = Chan :: new ( tx1 , rx2 ) ; let c2 = Chan :: new ( tx2 , rx1 ) ; ( c1 , c2 ) }
Create a pair of server and client channels for a given protocol `P`.
Create a pair of server and client channels for a given protocol ` P ` .