/// <summary> /// Listens for an inbound connection. /// </summary> public override void Accept() { AsyncSocket s = new AsyncSocket(null, this, (bool)m_listener[Options.SSL], false); s.LocalCertificate = m_listener[Options.LOCAL_CERTIFICATE] as System.Security.Cryptography.X509Certificates.X509Certificate2; m_sock = s; m_sock.Accept(new Address((int)m_listener[Options.PORT])); m_sock.RequestAccept(); }
/// <summary> /// Listens for an inbound connection. /// </summary> public override void Accept() { if (m_accept == null) { m_accept = new AsyncSocket(null, this, (bool)m_listener[Options.SSL], false); ((AsyncSocket)m_accept).LocalCertificate = m_listener[Options.LOCAL_CERTIFICATE] as X509Certificate2; Address addr = new Address((string)m_listener[Options.NETWORK_HOST], (int)m_listener[Options.PORT]); m_accept.Accept(addr); } m_accept.RequestAccept(); }