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

            return(data);
        }
示例#2
0
 public bool ReqChat(UdpClient client, String uid, String group, String chat)
 {
     if (client == null) return false;
     Message.ReqChat msg = new Message.ReqChat();
     msg.id = "101";
     msg.uid = uid;
     msg.group = group;
     msg.chat = chat;
     string jsonmsg = JsonConvert.SerializeObject(msg);
     byte[] data = UTF8Encoding.UTF8.GetBytes(jsonmsg);
     client.Send(data, data.Length);
     return true;
 }
示例#3
0
        public bool ReqChat(UdpClient client, String uid, String group, String chat)
        {
            if (client == null)
            {
                return(false);
            }
            Message.ReqChat msg = new Message.ReqChat();
            msg.id    = "101";
            msg.uid   = uid;
            msg.group = group;
            msg.chat  = chat;
            string jsonmsg = JsonConvert.SerializeObject(msg);

            byte[] data = UTF8Encoding.UTF8.GetBytes(jsonmsg);
            client.Send(data, data.Length);
            return(true);
        }