コード例 #1
0
        public void RequestLobbyChat(ServerPacketData packetData)
        {
            var sessionID = packetData.SessionID;

            LobbyServer.MainLogger.Debug("RequestChat");

            try
            {
                var lobbyObject = CheckLobbyAndLobbyUser(sessionID);
                if (lobbyObject.Item1 == false)
                {
                    return;
                }

                var reqData = new LobbyChatReqPacket();
                reqData.Decode(packetData.BodyData);

                ResponseLobbyChatToClient(sessionID, ERROR_CODE.NONE);


                var notifyPacket = new LobbyChatNtfPacket()
                {
                    Msg = reqData.Msg,
                };

                lobbyObject.Item2.Broadcast((UInt16)CL_PACKET_ID.NTF_LOBBY_CHAT, notifyPacket.ToBytes());

                LobbyServer.MainLogger.Debug("RequestChat - Success");
            }
            catch (Exception ex)
            {
                LobbyServer.MainLogger.Error(ex.ToString());
            }
        }
コード例 #2
0
        public void LobbyChatRequest(string message)
        {
            var requestPkt = new LobbyChatReqPacket()
            {
                Msg = message
            };

            if (CheckNetworkConnected() == false)
            {
                return;
            }

            try
            {
                PostSendPacket(CL_PACKET_ID.REQ_LOBBY_CHAT, requestPkt.ToBytes());
            }
            catch (Exception e)
            {
                Debug.Log(e.ToString());
            }
        }