상속: global::ProtoBuf.IExtensible
예제 #1
0
        private void OnConnectWorld(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.AckConnectWorldResult xData = NFMsg.AckConnectWorldResult.Parser.ParseFrom(xMsg.msg_data);

            mNetModule.Shut();
            mNetModule.ConnectServer(xData.world_ip.ToStringUtf8(), (ushort)xData.world_port);
            mKey = xData.world_key.ToStringUtf8();

            RequireVerifyWorldKey(mAccount, mKey);
        }
예제 #2
0
        private void OnConnectWorld(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.AckConnectWorldResult xData = new NFMsg.AckConnectWorldResult();

            xData = Serializer.Deserialize <NFMsg.AckConnectWorldResult>(new MemoryStream(xMsg.msg_data));

            mNetModule.Shut();
            mNetModule.ConnectServer(System.Text.Encoding.Default.GetString(xData.world_ip), (ushort)xData.world_port);
            mKey = System.Text.Encoding.Default.GetString(xData.world_key);

            RequireVerifyWorldKey(mAccount, mKey);
        }
예제 #3
0
        private void EGMI_ACK_CONNECT_WORLD(MsgHead head, MemoryStream stream)
        {
            mNet.mxClient.Disconnect();
            mNet.mxListener.FinalLog();

            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.AckConnectWorldResult xData = new NFMsg.AckConnectWorldResult();
            xData = Serializer.Deserialize <NFMsg.AckConnectWorldResult>(new MemoryStream(xMsg.msg_data));

            ///
            mNet.mPlayerState = NFNet.PLAYER_STATE.E_WAITING_PLAYER_TO_GATE;
            mNet.strKey       = System.Text.Encoding.Default.GetString(xData.world_key);
            mNet.strWorldIP   = System.Text.Encoding.Default.GetString(xData.world_ip);
            mNet.nWorldPort   = xData.world_port;
        }
예제 #4
0
        private void OnConnectWorld(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);
            NFMsg.AckConnectWorldResult xData = NFMsg.AckConnectWorldResult.Parser.ParseFrom(xMsg.msg_data);

            mKey = xData.world_key.ToStringUtf8();

            mNetModule.BeforeShut();
            mNetModule.Shut();

            String strIP = xData.world_ip.ToStringUtf8();

            if (strIP == "127.0.0.1")
            {
                strIP = mNetModule.FirstIP();
            }
            mNetModule.StartConnect(strIP, xData.world_port);
        }
예제 #5
0
        private void EGMI_ACK_CONNECT_WORLD(NFMsg.MsgBase xMsg)
        {
            mxNetController.mxNetClient.Disconnect();

            NFMsg.AckConnectWorldResult xData = new NFMsg.AckConnectWorldResult();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.AckConnectWorldResult)) as NFMsg.AckConnectWorldResult;

            ///
            mxNetController.mPlayerState = NFNetController.PLAYER_STATE.E_START_CONNECT_TO_GATE;

            mxNetController.strKey     = System.Text.Encoding.Default.GetString(xData.world_key);
            mxNetController.strWorldIP = System.Text.Encoding.Default.GetString(xData.world_ip);
            mxNetController.nWorldPort = xData.world_port;
            if (mxNetController.strWorldIP.Equals("127.0.0.1"))
            {
                mxNetController.strWorldIP = mxNetController.strFirstIP;
            }
        }
예제 #6
0
        private void EGMI_ACK_CONNECT_WORLD(MsgHead head, MemoryStream stream)
        {
            mNet.mxClient.Disconnect();
            mNet.mxListener.FinalLog();

            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize<NFMsg.MsgBase>(stream);

            NFMsg.AckConnectWorldResult xData = new NFMsg.AckConnectWorldResult();
            xData = Serializer.Deserialize<NFMsg.AckConnectWorldResult>(new MemoryStream(xMsg.msg_data));

            ///
            mNet.mPlayerState = NFNet.PLAYER_STATE.E_WAITING_PLAYER_TO_GATE;
            mNet.strKey = System.Text.Encoding.Default.GetString(xData.world_key);
            mNet.strWorldIP = System.Text.Encoding.Default.GetString(xData.world_ip);
            mNet.nWorldPort = xData.world_port;
            Debug.Log("SelectWorld SUCCESS  ProxyIpPort: " + mNet.strWorldIP + ":" + mNet.nWorldPort + " Key: " + mNet.strKey);
        }