Ejemplo n.º 1
0
        protected void OnClientTimeOut(TcpSocket client)
        {
            ClientTimeout?.Invoke(this, new TcpSocketEventArgs {
                Client = client
            });

            client.Dispose();
        }
Ejemplo n.º 2
0
        public TcpSocket NewClient(IPEndPoint local, IPEndPoint address)
        {
            var client = new TcpSocket {
                Server = this
            };

            client.Socket = new Socket(address.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
            if (local != null)
            {
                client.Socket.Bind(local);
            }
            client.Connect(address);
            return(client);
        }
Ejemplo n.º 3
0
 public void Remove(TcpSocket client)
 {
     client.Dispose();
 }