Example #1
0
        public static IInteractor Create(TcpClient tcpClient, EventQueue <InteractorEventArgs> eventQueue, CancellationToken token)
        {
            var interactor = new Interactor(tcpClient.GetStream(), ((IPEndPoint)tcpClient.Client.RemoteEndPoint).Address, eventQueue, token);

            return(interactor);
        }
        public IInteractor Accept()
        {
            var tcpClient = _listener.AcceptTcpClient();

            return(Interactor.Create(tcpClient, _eventQueue, _token));
        }