mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
* Use `NetworkStream` from CoreFX. This brings the `NetworkStream` class and related tests from CoreFX. * `SocketAsyncEventArgs`: partially replace the following properties with the CoreFX version: `Buffer`, `BufferList`, `Offset`, `SetBuffer ()` as well as the internal `CopyBufferFrom ()`. * `SocketAsyncResult`: change `Buffer` from `byte[]` to `Memory<byte>`. * Add internal `Socket` overloads: - `Receive (Memory<byte> buffer, int, int, SocketFlags, out SocketError)` - `ReceiveFrom (Memory<byte>, int, int, SocketFlags, ref EndPoint, out SocketError)` - `SendTo (Memory<byte>, int, int, SocketFlags, EndPoint)` * Implement async task overloads from CoreFX (`Socket.Tasks.cs`) to `Socket`: - `int Read(Span<byte>)` - `Task<int> ReadAsync(byte[], int, int, CancellationToken)` - `ValueTask<int> ReadAsync(Memory<byte>, CancellationToken)` - `int ReadByte()` - `void Write(ReadOnlySpan<byte>)` - `Task WriteAsync(byte[], int, int, CancellationToken)` - `ValueTask WriteAsync(ReadOnlyMemory<byte>, CancellationToken)` - `void WriteByte(byte)` * remove internal unused `PooledStream` and `ConnectionPool` APIs. * bring new tests from CoreFX: - `System.Net.Sockets/tests/FunctionalTests/NetworkStreamTest.cs` - `System.Net.Sockets/tests/FunctionalTests/NetworkStreamTest.netcoreapp.cs` * corlib: add `System.IO.FileSystem` and `System.Net.Sockets` resources and update SR. * Update Socket.cs * [csproj] Update project files * Bump API snapshot submodule