Пример #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;
 }