public override async Task FlushAsync(CancellationToken cancellationToken)
        {
            //Send to client socket and reset stream
            await _connection.SendBinary(new ArraySegment <byte>(ToArray()), true);

            SetLength(0);
        }