//
 // Create socket for address family
 //
 public Socket(AddressFamily addressFamily, SocketType socketType,
               ProtocolType protocolType, uint keepAlive, IProxySocketFactory factory = null)
 {
     if (factory == null)
     {
         factory = new ProxySocketFactory();
     }
     _internal = factory.Create(addressFamily, protocolType, socketType, keepAlive);
 }
Exemple #2
0
 public ConnectableProxySocket(IProxySocketFactory proxySocket, string hostname, string fingerprint)
 {
     this.proxySocket = proxySocket;
     this.hostname    = hostname;
     this.fingerprint = fingerprint;
 }
 //
 // Create socket for address family
 //
 public Socket(AddressFamily addressFamily, SocketType socketType,
               ProtocolType protocolType, IProxySocketFactory factory = null) :
     this(addressFamily, socketType, protocolType, RemoteTimeout, factory)
 {
 }
 //
 // Create a socket
 //
 public Socket(SocketType socketType, ProtocolType protocolType,
               IProxySocketFactory factory = null)
     : this(AddressFamily.InterNetwork, socketType, protocolType, factory)
 {
 }