/// <summary> /// 接收消息 /// </summary> /// <returns>返回消息内容和发送时间</returns> public string ChatByReceive(string data, Client client, Server server) { string[] strs = data.Split(','); int id = int.Parse(strs[0]); int friendId = int.Parse(strs[1]); Messages message = null; message = messageDAO.ReceiveToChat(client.MySqlConnection, id, friendId); if (message != null) { return(((int)ReturnCode.Success).ToString() + "," + message.ToString()); } else { return(((int)ReturnCode.Fail).ToString()); } }