pub fn admin_server(chan: SyncSender<Event>, port: u16, host: &str) {
    let tcp = TcpListener::bind((host, port)).unwrap();
    for stream in tcp.incoming() {
        match stream {
            Ok(stream) => {
                chan.send(Event::TcpMessage(stream)).unwrap();
            }
            Err(e) => panic!("Unable to establish TCP socket: {}", e),
        }
    }
}
/// Setup the TCP socket that listens for management commands.
Setup the TCP socket that listens for management commands.
Setup the TCP socket that listens for management commands .
pub fn admin_server(chan: SyncSender<Event>, port: u16, host: &str) {
    let tcp = TcpListener::bind((host, port)).unwrap();
    for stream in tcp.incoming() {
        match stream {
            Ok(stream) => {
                chan.send(Event::TcpMessage(stream)).unwrap();
            }
            Err(e) => panic!("Unable to establish TCP socket: {}", e),
        }
    }
}
pub fn admin_server ( chan : SyncSender < Event > , port : u16 , host : & str ) { let tcp = TcpListener :: bind ( ( host , port ) ) . unwrap ( ) ; for stream in tcp . incoming ( ) { match stream { Ok ( stream ) => { chan . send ( Event :: TcpMessage ( stream ) ) . unwrap ( ) ; } Err ( e ) => panic ! ( " " e ) , } } }
Setup the TCP socket that listens for management commands.
Setup the TCP socket that listens for management commands .
chan
SyncSender<Event>
port
u16
host
&str