Ejemplo n.º 1
0
 //adds a site to listen for
 public void AttachSite(Site site,sIPPortPair ipp)
 {
     if (UseSSL || ipp.UseSSL)
         new BoundMultipleSSLException(new sIPPortPair(_ip, _port, false));
     if ((ipp.Address == IPAddress.Any)||((IP!=IPAddress.Any)&&(ipp.Address!=_ip)))
         _ip = IPAddress.Any;
     _sites.Add(site);
 }
Ejemplo n.º 2
0
 public override X509Certificate GetCertificateForEndpoint(sIPPortPair pair)
 {
     if (SSLCertificatePath == null)
         return null;
     return X509Certificate.CreateFromCertFile(SSLCertificatePath);
 }
Ejemplo n.º 3
0
 public BoundMultipleSSLException(sIPPortPair pair) :
     base("An attempt was made to bind multiple sites to "+pair.Address.ToString()+":"+pair.Port.ToString()+" and request using ssl, unable to handle.")
 {
 }
Ejemplo n.º 4
0
 //creates a new instance of a tcp port listener for a given site
 public PortListener(Site site,sIPPortPair ipp)
 {
     _rand = new MT19937(DateTime.Now.Ticks);
     _sites = new List<Site>();
     _sites.Add(site);
     _port = ipp.Port;
     _ip = ipp.Address;
     _useSSL = ipp.UseSSL;
     _idleSeonds = (long)Math.Min(_idleSeonds, ipp.IdleSeconds);
     _totalRunSeconds = (long)Math.Min(_totalRunSeconds, ipp.TotalRunSeconds);
     _backLog = (int)Math.Min(_backLog, ipp.BackLog);
 }
Ejemplo n.º 5
0
 public override X509Certificate GetCertificateForEndpoint(sIPPortPair pair)
 {
     return new X509Certificate(".\\testCert.cer");
 }
Ejemplo n.º 6
0
 public virtual X509Certificate GetCertificateForEndpoint(sIPPortPair pair)
 {
     throw new NotImplementedException();
 }