Ejemplo n.º 1
0
        private static void Msg_CommonRequest(INetworkSocket socket, int msgIdx, string[] msgData)
        {
            string sendData = TransferProtocol.InitMsgData((MsgTypeCS)msgIdx);

            foreach (var node in msgData)
            {
                sendData += node;
                sendData += "#";
            }
            Program.g_console_server.Send(socket, sendData);
        }
Ejemplo n.º 2
0
        public void ReceivedMsg(INetworkSocket socket, string msgData)
        {
            int msgIdx;

            string[] msgStr = TransferProtocol.GetMsgStruct(msgData, out msgIdx);
            if (!msgDictionary.ContainsKey(msgIdx))
            {
                return;
            }
            bool isValid = Program.g_console_server.m_socket_manager.IsContainSocket(socket);

            if (!isValid)
            {
                return;
            }
            msgDictionary[msgIdx].Run(socket, msgStr);
        }