示例#1
0
 public static TcpClient CreateRandom(String hostname, int port)
 {
     NetworkInterfaces ni = new NetworkInterfaces();
     NetworkCard nc = ni.GetInternetInterfaces()[ni.GetInternetInterfaces().Length -1];
     TcpClientEx client = null;
     client = new TcpClientEx(nc.Address,hostname,(Int16)port);
     return client;
 }
示例#2
0
 public static TcpClientEx Create(IPAddress ifaceIp,String hostname,int port)
 {
     TcpClientEx client = null;
     client = new TcpClientEx(ifaceIp,hostname,(Int16)port);
     return client;
 }