コード例 #1
0
		public virtual C2S.Message.ReqLogin ReqLogin(NetIncomingMessage im)
		{
			Message.ReqLogin data = new Message.ReqLogin();
			data.id = im.ReadString();
			if(OnReqLogin != null) OnReqLogin(im, data);

			return data;
		}
コード例 #2
0
        public virtual C2S.Message.ReqLogin ReqLogin(string message)
        {
            Message.ReqLogin data = JsonConvert.DeserializeObject <Message.ReqLogin>(message);
            if (OnReqLogin != null)
            {
                OnReqLogin(message, data);
            }

            return(data);
        }
コード例 #3
0
        public virtual C2S.Message.ReqLogin ReqLogin(NetIncomingMessage im)
        {
            Message.ReqLogin data = new Message.ReqLogin();
            data.id = im.ReadString();
            if (OnReqLogin != null)
            {
                OnReqLogin(im, data);
            }

            return(data);
        }
コード例 #4
0
 public bool ReqLogin(UdpClient client, String uid)
 {
     if (client == null) return false;
     Message.ReqLogin msg = new Message.ReqLogin();
     msg.id = "102";
     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 ReqLogin(UdpClient client, String uid)
        {
            if (client == null)
            {
                return(false);
            }
            Message.ReqLogin msg = new Message.ReqLogin();
            msg.id  = "102";
            msg.uid = uid;
            string jsonmsg = JsonConvert.SerializeObject(msg);

            byte[] data = UTF8Encoding.UTF8.GetBytes(jsonmsg);
            client.Send(data, data.Length);
            return(true);
        }