add Memory<byte> support in SendPacketElements and SendPacketsAsync#46975
add Memory<byte> support in SendPacketElements and SendPacketsAsync#46975geoffkizer merged 8 commits intodotnet:masterfrom
Conversation
|
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsFixes #45267 @antonfirsov @stephentoub @dotnet/ncl
|
|
/azp run runtime-libraries-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
src/libraries/System.Net.Sockets/src/System/Net/Sockets/SendPacketsElement.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Sockets/src/System/Net/Sockets/SendPacketsElement.cs
Show resolved
Hide resolved
antonfirsov
left a comment
There was a problem hiding this comment.
A few concerns regarding tests, otherwise looks good.
I would add at least one test that uses NativeMemoryManager to wrap an actual pointer into ReadOnlyMemory<byte> & apply custom some offset + length there to stress that behavior too.
src/libraries/System.Net.Sockets/tests/FunctionalTests/SendPacketsAsync.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Sockets/tests/FunctionalTests/SendPacketsAsync.cs
Outdated
Show resolved
Hide resolved
…cketsElement.cs Co-authored-by: Stephen Toub <[email protected]>
|
There are also a bunch of tests marked as [Outerloop] that don't need to be, as far as I can tell. Will remove this. |
…endpacketelementsmemory
|
Feedback addressed. Please take a look. |
|
/azp run runtime-libraries-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| return new ElementWithMemoryManager(new SendPacketsElement(memoryManager.Memory.Slice(offset, count)), memoryManager); | ||
| } | ||
|
|
||
| private static ElementWithMemoryManager CreateElementForBuffer(BufferType bufferType, int size) => |
Fixes #45267
@antonfirsov @stephentoub @dotnet/ncl