public void Start(Dictionary <string, string> customHeaders)
        {
            if (customHeaders != null)
            {
                this._customHeaders = customHeaders;
            }

            this.sendArgs = new SocketAsyncEventArgsExt();
            this.sendArgs.RemoteEndPoint = new DnsEndPoint(this.Uri.DnsSafeHost, this.Uri.Port);
#if !SILVERLIGHT
#else
            this.sendArgs.SocketClientAccessPolicyProtocol = SocketClientAccessPolicyProtocol.Http;
#endif
            this.sendArgs.Completed += this.OnTcpConnectCompleted;
            this.socket              = new SecureSocketProxy("wss".Equals(Uri.Scheme, StringComparison.OrdinalIgnoreCase));
            this.socket.NoDelay      = this.noDelay;

            if (!this.socket.ConnectAsync(this.sendArgs))
            {
                this.ProcessConnectCompleted(true);
            }
        }
        public void Start(Dictionary<string, string> customHeaders)
        {
            if (customHeaders != null)
                this._customHeaders = customHeaders;

            this.sendArgs = new SocketAsyncEventArgsExt();
            this.sendArgs.RemoteEndPoint = new DnsEndPoint(this.Uri.DnsSafeHost, this.Uri.Port);
            #if !SILVERLIGHT
            #else
            this.sendArgs.SocketClientAccessPolicyProtocol = SocketClientAccessPolicyProtocol.Http;
            #endif
            this.sendArgs.Completed += this.OnTcpConnectCompleted;
            this.socket = new SecureSocketProxy("wss".Equals(Uri.Scheme, StringComparison.OrdinalIgnoreCase));
            this.socket.NoDelay = this.noDelay;

            if (!this.socket.ConnectAsync(this.sendArgs))
            {
                this.ProcessConnectCompleted(true);
            }
        }