public PacketClass AddToQueue(DefinedProtocol.eFromServer fromServerID, object str)
        {
            PacketClass packet = new PacketClass();

            packet.CreatePacket(fromServerID, str);

            return(packet);
        }
        public PacketClass AddToQueue(DefinedProtocol.eToClient toClientID, object str, long uuid)
        {
            PacketClass packet = new PacketClass();

            packet.CreatePacket(toClientID, str, uuid);

            return(packet);
        }
        public PacketClass AddToQueue(DefinedProtocol.eToClient toClientID, object str, int castIdentifier)
        {
            PacketClass packet = new PacketClass();

            packet.CreatePacket(toClientID, str, castIdentifier);

            return(packet);
        }
        public void AddFromQueue(Queue <PacketClass> fromClient)
        {
            if (_socketList.Count != 0)
            {
                for (int n = 0; n < _socketList.Count; n++)
                {
                    byte[] buffer;
                    int    recvLen;
                    if (_socketList[n] != null && _socketList[n].ReceiveBuffer(out buffer, out recvLen))
                    {
                        DefinedStructure.PacketInfo pInfo = new DefinedStructure.PacketInfo();
                        pInfo = (DefinedStructure.PacketInfo)ConvertPacket.ByteArrayToStructure(buffer, pInfo.GetType(), recvLen);

                        PacketClass packet = new PacketClass(pInfo._id, pInfo._data, pInfo._totalSize, n, _socketList[n]._UUID);
                        fromClient.Enqueue(packet);
                    }
                }
            }
        }