Esempio n. 1
0
        private void Connect()
        {
            m_errorCount = 0;

            if (!m_keepRunning)
                return;
            m_state = ParseState.START;
            m_sock = new AsyncSocket(null, this, m_ssl, false);
            m_sock.Connect(m_addr, m_host);
        }
Esempio n. 2
0
        /// <summary>
        /// Create an outbound socket.
        /// </summary>
        /// <param name="listener">Where to send notifications</param>
        /// <param name="addr">Address to connect to</param>
        /// <param name="SSL">Do SSL3/TLS1 on startup</param>
        /// <param name="hostId">The logical name of the host to connect to, for SSL/TLS purposes.</param>
        /// <returns>Socket that is in the process of connecting</returns>
        public AsyncSocket CreateConnectSocket(ISocketEventListener listener,
            Address              addr,
            bool                 SSL,
            string               hostId)
        {
            AsyncSocket result;

            // Create the socket:
            result = new AsyncSocket(this, listener, SSL, m_synch);
            if (SSL)
                result.LocalCertificate = m_cert;

            // Start the connect process:
            result.Connect(addr, hostId);
            return result;
        }