Пример #1
0
		public virtual C2S.Message.ReqLogout ReqLogout(NetIncomingMessage im)
		{
			Message.ReqLogout data = new Message.ReqLogout();
			data.id = im.ReadString();
			if(OnReqLogout != null) OnReqLogout(im, data);

			return data;
		}
Пример #2
0
        public virtual C2S.Message.ReqLogout ReqLogout(string message)
        {
            Message.ReqLogout data = JsonConvert.DeserializeObject <Message.ReqLogout>(message);
            if (OnReqLogout != null)
            {
                OnReqLogout(message, data);
            }

            return(data);
        }
Пример #3
0
        public virtual C2S.Message.ReqLogout ReqLogout(NetIncomingMessage im)
        {
            Message.ReqLogout data = new Message.ReqLogout();
            data.id = im.ReadString();
            if (OnReqLogout != null)
            {
                OnReqLogout(im, data);
            }

            return(data);
        }
Пример #4
0
        public bool ReqLogout(UdpClient client, String uid)
        {
            if (client == null)
            {
                return(false);
            }
            Message.ReqLogout msg = new Message.ReqLogout();
            msg.id  = "103";
            msg.uid = uid;
            string jsonmsg = JsonConvert.SerializeObject(msg);

            byte[] data = UTF8Encoding.UTF8.GetBytes(jsonmsg);
            client.Send(data, data.Length);
            return(true);
        }
Пример #5
0
 public bool ReqLogout(UdpClient client, String uid)
 {
     if (client == null) return false;
     Message.ReqLogout msg = new Message.ReqLogout();
     msg.id = "103";
     msg.uid = uid;
     string jsonmsg = JsonConvert.SerializeObject(msg);
     byte[] data = UTF8Encoding.UTF8.GetBytes(jsonmsg);
     client.Send(data, data.Length);
     return true;
 }