protected virtual void OnKill(SocketBufferEventArgs pEventArgs) { if (this.Die != null) { this.Die(this, pEventArgs); } }
public void ClientDied(object pSender, SocketBufferEventArgs pEventArgs) { try { _ClientsConnected.Remove(pEventArgs); this.WriteToLog(string.Concat("Client Disconnected from [", pEventArgs.Client.Sock.RemoteEndPoint, "]"), 2); } catch { } }
public void Kill() { try { if (_SendingData) { this._CleanUp = true; } else { this._CleanUp = true; SocketBufferEventArgs e = new SocketBufferEventArgs(this); this.OnKill(e); this.Sock.Close(); } } catch { } }