static void SendMsg() { //Console.WriteLine("请输入From ID:"); //string from = Console.ReadLine(); Console.Write("请输入To ID:"); string to = Console.ReadLine(); Console.Write("请输入消息:"); string msg = Console.ReadLine(); client.Send(new CmdInfo(validString, CmdType.SendMsg, new MsgInfo() { From = client.GetUserId(), Msg = msg, To = Convert.ToInt32(to), Type = MsgType.Text, ToType = MsgToType.User })); }