private void HandleClosed(FtpSocketHandler handler) { this.UpdateSubSystemHost(this, string.Format("Client #{0} has disconnected", handler.Id)); this.connections.Remove(handler); if (this.ConnectionClosed != null) { this.ConnectionClosed(handler.Id); } }
private void InitialiseSocketHandler(TcpClient socket) { var handler = new FtpSocketHandler(fileSystemClassFactory, id); handler.Start(socket); this.connections.Add(handler); handler.Closed += HandleClosed; if (this.NewConnection != null) { this.NewConnection(id); } }
private void InitialiseSocketHandler(TcpClient socket) { var handler = new FtpSocketHandler(_fileSystemClassFactory, _id); handler.Start(socket); this._connections.Add(handler); handler.Closed += handler_Closed; if (this.NewConnection != null) { this.NewConnection(_id); } }
private void handler_Closed(FtpSocketHandler handler) { this.UpdateSubSystemHost(this, string.Format("Client #{0} has disconnected", handler.Id)); this._connections.Remove(handler); if (this.ConnectionClosed != null) { this.ConnectionClosed(handler.Id); } }