Пример #1
0
        public MatchingData JoinGame_ToStruct(byte[] packet)
        {
            MatchingData temp = new MatchingData();
            object       obj  = (object)temp;

            PacketToStruct(packet, ref obj);
            temp = (MatchingData)obj;

            return(temp);
        }
Пример #2
0
        public void ReceiveRequestMatching(MatchingData message)
        {
            if (RequestMatchingEvent != null)
            {
                RequestMatchingDataReceivedArgs Parameter = new RequestMatchingDataReceivedArgs();
                Parameter.Data = message;

                RequestMatchingEvent(Parameter);
            }
        }
Пример #3
0
        public void PacketParsing(byte[] packet)
        {
            switch (packet[2])
            {
            case (byte)MessageID.IndianPokser:
                MatchingData startmatching = JoinGame_ToStruct(packet);
                eventManager.ReceiveRequestMatching(startmatching);
                break;

            case (byte)MessageID.MazeOfMemory:
                break;

            case (byte)MessageID.RememberNumber:
                break;

            case (byte)MessageID.FinishedAndSum:
                break;
            }
        }