Try using socket syscalls that accepts a single buffer to improve performance (#36371)
authorTom Deseyn <tom.deseyn@gmail.com>
Tue, 19 May 2020 18:43:24 +0000 (20:43 +0200)
committerGitHub <noreply@github.com>
Tue, 19 May 2020 18:43:24 +0000 (14:43 -0400)
commitcf1390cbb7262fbedbbfc677f49a7fb3ed0df336
treef02272efd4bf15991958ab98ccbb6e733e56d0db
parent20ee02bda38a50a370ff18b794f39e2fe43e3943
Try using socket syscalls that accepts a single buffer to improve performance (#36371)

* Try using socket syscalls that accepts a single buffer to improve performance

* Remove ref from Receive calls

* Prefix Pal methods invoking methods with Sys

* Also use single-buffer syscalls for sync Socket Receive methods

* Improve comment

* PR feedback

* Assert SocketAddress null instead of checking
src/libraries/Common/src/Interop/Unix/System.Native/Interop.Receive.cs [new file with mode: 0644]
src/libraries/Common/src/Interop/Unix/System.Native/Interop.Send.cs [new file with mode: 0644]
src/libraries/Native/Unix/System.Native/pal_networking.c
src/libraries/Native/Unix/System.Native/pal_networking.h
src/libraries/System.Net.Sockets/src/System.Net.Sockets.csproj
src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs
src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs
src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs
src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketPal.Unix.cs
src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketPal.Windows.cs