Exemplo n.º 1
0
        void OnLogin(string sessionID, BMLoginRequest msg)
        {
            GetData(sessionID).SetData("Hip-Hop", msg.ListenerAddress);
            BMLoginReply reply = new BMLoginReply();

            reply.Name = GetData(sessionID).name;
            SendMessage(sessionID, reply);
            Debug.Log($"战场登录成功, 战场名:{reply.Name}");
        }
Exemplo n.º 2
0
        public void Login()
        {
            BMLoginRequest msg = new BMLoginRequest();

            msg.ListenerAddress = NetTool.GetAddress(NetConfig.LISTENER_IP, NetConfig.LISTENER_PORT);
            SendMessage <BMLoginRequest, BMLoginReply>(msg, (reply) =>
            {
                Logger.Log($"登录主服成功, 战场名: {reply.Name}");
            });
        }
Exemplo n.º 3
0
        public void Login()
        {
            BMLoginRequest msg  = new BMLoginRequest();
            var            serv = NetworkManager.instance.forClient.server as Plugins.Network.WebSocketServer;

            msg.ListenerAddress = Plugins.NetTool.GetAddress(NetConfig.LISTENER_IP, NetConfig.LISTENER_PORT);
            SendMessage <BMLoginRequest, BMLoginReply>(msg, (reply) =>
            {
                Debug.Log($"登录主服成功, 战场名: {reply.Name}");
            });
        }