public gameConnection(Socket _ClientSocket, int _ConnectionID) { this.ConnectedUser = new User(this); this.Handler = new RequestMessages(_ConnectionID); Handler.User = this.ConnectedUser; Handler.LoadRequests(this.ConnectedUser); this.ClientSocket = _ClientSocket; this._ConnectionID = _ConnectionID; ConnectedUser.pingOK = true; Callback = new AsyncCallback(ReceivedData); WaitForData(); Ping(); connectionHelper.AddConnection(this, _ConnectionID); }
private void Crash() { ClientSocket = null; dataBuffer = null; _ConnectionID = 0; ConnectedUser = null; Handler = null; SocketClosed = true; SocketReceivedPing = false; Callback = null; }