/// Creates a new connection for the given socket.
Creates a new connection for the given socket.
Creates a new connection for the given socket .
pub fn new(
        sock: TcpStream,
        session: u16,
        history: OriginsHistory,
        notify: NotifyReceiver,
        timing: Timing,
    ) -> Self {
        let (read, write) = sock.split();
        Connection {
            input: InputStream::new(read, notify),
            output: OutputState::Idle(write),
            session, history, timing
        }
    }
pub fn new ( sock : TcpStream , session : u16 , history : OriginsHistory , notify : NotifyReceiver , timing : Timing , ) -> Self { let ( read , write ) = sock . split ( ) ; Connection { input : InputStream :: new ( read , notify ) , output : OutputState :: Idle ( write ) , session , history , timing } }
Creates a new connection for the given socket.
Creates a new connection for the given socket .
sock
TcpStream
session
u16
history
OriginsHistory
notify
NotifyReceiver
timing
Timing