private void AcceptClient( IAsyncResult asRes) { var clientSocket = ((TcpListener)asRes.AsyncState).EndAcceptTcpClient(asRes); var client = new Client(clientSocket); client.OnData += DataReceived; client.OnDisconnect += ClientDisconnected; clientsList.Add(client); tcpClientConnected.Set(); }
public SocketData(Client client, String data) { _client = client; _data = data; }