protected override void AcceptedSocket(TinySocket sock) { var client = new TCPClient(sock); lock (Clients) Clients.Add(client); sock.OnSocketClosedEvent += () => { lock (Clients) Clients.Remove(client); }; NotifySocketClientAccepted(client); }
private void NotifySocketClientAccepted(TCPClient socket) { var evnt = SocketClientAccepted; if (evnt != null) evnt(socket); }