private void ListenConnections() { while (shouldListen) { FrameworkSocket client = new FrameworkSocket(listener.AcceptTcpClient()); client.DataReceived += OnDataReceived; client.Disconnected += OnClientDisconnected; clientList.Add(client); OnClientConnected(this, new Socket_EventArgs(client)); } }
public Socket_EventArgs(FrameworkSocket s) { sock = s; }