BeginConnect() public method

Creates a connection with the server.
public BeginConnect ( Uri url, int timeout, AsyncCallback callback, object state ) : IAsyncResult
url System.Uri
timeout int
callback AsyncCallback
state object
return IAsyncResult
        /// <summary>
        /// Begins an asynchronous operation to open a secure channel with the endpoint identified by the URL.
        /// </summary>
        /// <param name="callback">The callback to call when the operation completes.</param>
        /// <param name="callbackData">The callback data to return with the callback.</param>
        /// <returns>
        /// The result which must be passed to the EndOpen method.
        /// </returns>
        /// <exception cref="ServiceResultException">Thrown if any communication error occurs.</exception>
        /// <seealso cref="Open"/>
        public IAsyncResult BeginOpen(AsyncCallback callback, object callbackData)
        {
            lock (m_lock)
            {
                // create the channel.
                m_channel = new TcpClientChannel(
                    Guid.NewGuid().ToString(),
                    m_bufferManager,
                    m_quotas,
                    m_settings.ClientCertificate,
                    m_settings.ServerCertificate,
                    m_settings.Description);
                //((TcpClientChannel)m_channel).ClientCertificateChain = m_settings.ClientCertificateChain;

                // begin connect operation.
                return m_channel.BeginConnect(this.m_url, m_operationTimeout, callback, callbackData);
            }
        }