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; }
public virtual C2S.Message.ReqLogin ReqLogin(string message) { Message.ReqLogin data = JsonConvert.DeserializeObject <Message.ReqLogin>(message); if (OnReqLogin != null) { OnReqLogin(message, data); } return(data); }
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); }
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; }
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); }