Opc.Ua.Bindings.TcpTransportChannel.BeginOpen C# (CSharp) Method

BeginOpen() public method

Begins an asynchronous operation to open a secure channel with the endpoint identified by the URL.
Thrown if any communication error occurs.
public BeginOpen ( AsyncCallback callback, object callbackData ) : IAsyncResult
callback AsyncCallback The callback to call when the operation completes.
callbackData object The callback data to return with the callback.
return IAsyncResult
        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);

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