AwaitHeader() private method

private AwaitHeader ( ) : void
return void
        public override WebSocketMessageReadStream ReadMessage()
        {
            _connection.AwaitHeader();

            if (_connection.IsConnected && _connection.CurrentHeader != null)
            {
                WebSocketMessageReadStream reader = new WebSocketMessageReadRfc6455Stream(_connection);
                foreach (var extension in _extensions)
                {
                    reader = extension.ExtendReader(reader);
                }
                return(reader);
            }

            return(null);
        }
Ejemplo n.º 2
0
 private void LoadNewHeader()
 {
     _webSocket.AwaitHeader();
     _hasPendingFrames = HasPendingFrames();
 }