这句话中,,,有什么地方错了?异步操作中,连接后提示不支持此种协议.错误在红色地方!
public Form1()
  {
  InitializeComponent();
  setRichTextBoxReceiveCallBack = new SetRichTextBoxReceiveCallBack(SetRichTextBoxReceive);
  setlistboxcallback = new SetListBoxCallBack(SetListBox);
  }  private void buttonConnect_Click(object sender, EventArgs e)
  {
  client =new TcpClient(AddressFamily.InterNetwork);
  IPAddress[] serverIP=Dns.GetHostAddresses(Dns.GetHostName());
  AsyncCallback requestCallBack=new AsyncCallback(RequestCallBack);
  allDone.Reset();
 /[color=#FF0000]///client.BeginConnect(IPAddress.Parse("192.168.0.110"),5000,requestCallBack,client);///[/color]
  listBoxStatus.Invoke(setlistboxcallback,string.Format("本机终结点:{0}",client.Client.LocalEndPoint));
  listBoxStatus.Invoke(setlistboxcallback,"开始与服务器连接");
  allDone.WaitOne();
  }
  private void RequestCallBack(IAsyncResult iar)
  {
  allDone.Set();
  try
  {
  client=(TcpClient)iar.AsyncState;
  client.EndConnect(iar);
  listBoxStatus.Invoke(setlistboxcallback,string.Format("与服务器{0}连接成功"),client.Client.RemoteEndPoint);
  ns=client.GetStream();
  DataRead dataRead=new DataRead (ns,client.ReceiveBufferSize);
  ns.BeginRead(dataRead.msg,0,dataRead.msg.Length,ReadCallBack,dataRead);
  }
  catch (Exception e)
  {
  listBoxStatus.Invoke(setlistboxcallback, e.Message);
  }
  finally
  {}
  }
  private void ReadCallBack(IAsyncResult iar)
  {
  try
  {
  DataRead dataRead=(DataRead)iar.AsyncState;
  int recv=dataRead.nst.EndRead(iar);
  richTextBoxRecv.Invoke(setRichTextBoxReceiveCallBack,Encoding.UTF8.GetString(dataRead.msg,0,recv));
  if(isExit==false)
  {
  dataRead=new DataRead(ns,client.ReceiveBufferSize);
  ns.BeginRead(dataRead.msg,0,dataRead.msg.Length,ReadCallBack,dataRead);
  }
  }
  catch (Exception e)
  {
  listBoxStatus.Invoke(setlistboxcallback, e.Message);
  }
  finally { }
  }