Пример #1
0
        void s2c_stub_OnResLogin(Lidgren.Network.NetIncomingMessage im, S2C.Message.ResLogin data)
        {
            Console.WriteLine("OnResLogin...[ThreadID:{0}]", Thread.CurrentThread.ManagedThreadId);

            is_login = data.ret == (short)S2C.Message.Flag.kFlagSuccess ? true : false;

            if (is_login)
            {
                Console.WriteLine("You entered in.", data.ret);
            }
            else
            {
                Console.WriteLine("You can't entered in.", data.ret);
            }
        }
Пример #2
0
        void OnResLogin(string message, S2C.Message.ResLogin data)
        {
            session.user.uid = data.uid;

            if (data.isOk)
            {
                session.user.publicIp   = data.publicIp;
                session.user.publicPort = data.publicPort;
                session.isLogin         = true;
            }
            else
            {
                session.isLogin = false;
            }
            Console.WriteLine("[OnResLogin] Is ok? = {0}, Error Message = {1}", data.isOk, data.errorMessage);
        }