Пример #1
0
        /// <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();
        }
Пример #2
0
 /// <summary>
 /// Prepare to start accepting inbound requests.  Call RequestAccept() to start the async process.
 /// </summary>
 /// <param name="addr">Address to listen on</param>
 /// <param name="backlog">The Maximum length of the queue of pending connections</param>
 public override void Accept(Bedrock.Net.Address addr, int backlog)
 {
     m_sock.Accept(addr, backlog);
 }
Пример #3
0
        /// <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();
        }