예제 #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);
        }