Exemple #1
0
        private void PushInternalMsg(Packet.enInternalMsgType type)
        {
            com.QH.QPGame.GameUtils.Logger.Net.Log("PushInternalMsg:" + type.ToString());

            var packet = NetPacketPool.PopPacket(Packet.enPacketType.Internal);

            packet.MainCmd = (uint)type;

            lock (((ICollection)_packetlist).SyncRoot)
            {
                _packetlist.Add(packet);
            }
        }
Exemple #2
0
        public virtual void SendData(UInt32 mainCmd, UInt32 subCmd, int handleCode, byte[] dataBuffer)
        {
            if (clientSocket == null || clientSocket.Connected == false)
            {
                return;
            }

            var packet = NetPacketPool.PopPacket(Packet.enPacketType.Network);

            packet.MainCmd   = mainCmd;
            packet.SubCmd    = subCmd;
            packet.CheckCode = handleCode;
            packet.Data      = dataBuffer;
            _sendList.Add(packet);
        }