public virtual S2C.Message.NotifyLeave NotifyLeave(string message) { Message.NotifyLeave data = JsonConvert.DeserializeObject <Message.NotifyLeave>(message); if (OnNotifyLeave != null) { OnNotifyLeave(message, data); } return(data); }
public bool NotifyLeave(UdpClient client, String uid, String group) { if (client == null) return false; Message.NotifyLeave msg = new Message.NotifyLeave(); msg.id = "105"; 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 NotifyLeave(UdpClient client, String uid, String group) { if (client == null) { return(false); } Message.NotifyLeave msg = new Message.NotifyLeave(); msg.id = "105"; msg.uid = uid; msg.group = group; string jsonmsg = JsonConvert.SerializeObject(msg); byte[] data = UTF8Encoding.UTF8.GetBytes(jsonmsg); client.Send(data, data.Length); return(true); }