public virtual C2S.Message.ReqJoin ReqJoin(string message) { Message.ReqJoin data = JsonConvert.DeserializeObject <Message.ReqJoin>(message); if (OnReqJoin != null) { OnReqJoin(message, data); } return(data); }
public bool ReqJoin(UdpClient client, String uid, String group) { if (client == null) return false; Message.ReqJoin msg = new Message.ReqJoin(); msg.id = "104"; msg.uid = uid; msg.group = group; string jsonmsg = JsonConvert.SerializeObject(msg); byte[] data = UTF8Encoding.UTF8.GetBytes(jsonmsg); client.Send(data, data.Length); return true; }
public bool ReqJoin(UdpClient client, String uid, String group) { if (client == null) { return(false); } Message.ReqJoin msg = new Message.ReqJoin(); msg.id = "104"; msg.uid = uid; msg.group = group; string jsonmsg = JsonConvert.SerializeObject(msg); byte[] data = UTF8Encoding.UTF8.GetBytes(jsonmsg); client.Send(data, data.Length); return(true); }