I have a SocketConnection and push a fixed amount (say 10 MiB) of data into the PipeWriter to be sent to the client.
In the past, after I had written all my data, I would wait for the OnReaderCompleted "event" before disposing the socketConnection to make sure all bytes in the Pipe have been flushed to the socket. Otherwise, the client would not receive all bytes.
What can I do in .NET Core 3 between writing the last byte and closing the socket?
I have a SocketConnection and push a fixed amount (say 10 MiB) of data into the PipeWriter to be sent to the client.
In the past, after I had written all my data, I would wait for the
OnReaderCompleted
"event" before disposing the socketConnection to make sure all bytes in the Pipe have been flushed to the socket. Otherwise, the client would not receive all bytes.What can I do in .NET Core 3 between writing the last byte and closing the socket?