❔ RecyclableMemoryStreams and Sending a Byte Array
I am utilizing
RecyclableMemoryStream
to pool my memory streams in my networking project, but the issue comes from how Microsoft describes the use of ToArray()
to essentially cancel out the benefits of using recyclable streams.
I need to pass a byte array across the wire (i.e. I need to pass a byte array to ENet). How do I do this in the most performant way possible and not minimize the benefits of using the RecyclableMemoryStreams library?2 Replies
Remarks from Microsoft about
ToArray()
and GetBuffer()
https://github.com/Microsoft/Microsoft.IO.RecyclableMemoryStream#getbuffer-and-toarrayGitHub
GitHub - microsoft/Microsoft.IO.RecyclableMemoryStream: A library t...
A library to provide pooling for .NET MemoryStream objects to improve application performance. - GitHub - microsoft/Microsoft.IO.RecyclableMemoryStream: A library to provide pooling for .NET Memor...
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.