Example #1
0
        public void Send_SessionAck()
        {
            SessionAck ack = new SessionAck();

            ack.Name = Core.User.Settings.UserName;

            Debug.Assert(ack.Name != "");

            Log("Session Ack Sent");

            SendPacket(ack);
        }
Example #2
0
        public void Receive_SessionAck(G2ReceivedPacket embeddedPacket)
        {
            SessionAck ack = SessionAck.Decode(embeddedPacket);

            Core.IndexName(UserID, ack.Name);

            Log("Session Ack Received");

            if (AlreadyActive())
            {
                Send_Close("Already Active");
                return;
            }

            if (!ConnectAckSent)
            {
                Send_Close("Ack not Received");
                return;
            }

            UpdateStatus(SessionStatus.Active);
        }