示例#1
0
        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);
        }
示例#2
0
 private void Crash()
 {
     ClientSocket = null;
     dataBuffer = null;
     _ConnectionID = 0;
     ConnectedUser = null;
     Handler = null;
     SocketClosed = true;
     SocketReceivedPing = false;
     Callback = null;
 }