示例#1
0
        public virtual C2S.Message.ReqJoin ReqJoin(string message)
        {
            Message.ReqJoin data = JsonConvert.DeserializeObject <Message.ReqJoin>(message);
            if (OnReqJoin != null)
            {
                OnReqJoin(message, data);
            }

            return(data);
        }
示例#2
0
 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;
 }
示例#3
0
        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);
        }