Skip to content

SignalR3 streaming a byte array #26376

Answered by MerzMax
MerzMax asked this question in General
Sep 28, 2020 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

Thank you very much!

I missed the point, that WriteAsync(buffer) just writes the reference into a queue. I managed to fix this with the following snipped:

while ((source.Read(buffer = new byte[bufferSize], 0, buffer.Length)) > 0)
{
    await uploadChannel.Writer.WriteAsync(buffer);
}

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@BrennanConroy
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by MerzMax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants