public WebSocketClientTransmissionConnection(string url)
        {
            _log = LogManager.GetLogger <WebSocketClientTransmissionConnection>(Id.ToString());
            _disconnectCompletion.Task.PropagateCompletionToPromise(_connectCompletion);
            _webSocket         = new WebSocket(url.Replace("http://", "ws://"));
            _webSocket.Opened += OnOpened;
            _webSocket.Closed += OnClosed;
            _webSocket.Error  += OnError;

            _reader = new WebSocketClientTransmissionReader(Id, _webSocket, CancellationToken);
            _writer = new WebSocketClientTransmissionWriter(Id, _webSocket, CancellationToken);

            Completion.LogCompletion(_log);

            _log.Trace("Created");
        }
        public WebSocketClientTransmissionConnection(string url)
        {
            _log = LogManager.GetLogger <WebSocketClientTransmissionConnection>(Id.ToString());
            _disconnectCompletion.Task.PropagateCompletionToPromise(_connectCompletion);
            _webSocket                      = new WebSocket(url.Replace("http://", "ws://"));
            _webSocket.Opened              += OnOpened;
            _webSocket.Closed              += OnClosed;
            _webSocket.Error               += OnError;
            _webSocket.NoDelay              = true;
            _webSocket.EnableAutoSendPing   = true;
            _webSocket.AutoSendPingInterval = 5000;
            _webSocket.ReceiveBufferSize    = PooledBuffer.MaxSize;

            _reader = new WebSocketClientTransmissionReader(Id, _webSocket, CancellationToken);
            _writer = new WebSocketClientTransmissionWriter(Id, _webSocket, CancellationToken);

            Completion.LogCompletion(_log);

            _log.Trace("Created");
        }