The code is:
Socket serialPort1 = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
System.Net.IPAddress LocalIPAddress = System.Net.IPAddress.Parse("127.0.0.1");
System.Net.IPEndPoint LocalEndPoint = new System.Net.IPEndPoint( LocalIPAddress,80 );
serialPort1.Connect(LocalEndPoint);
serialPort1.Blocking = false;
serialPort1.Shutdown(SocketShutdown.Both);
serialPort1.Close();thanks.
