diff options
author | Martin Baulig <mabaul@microsoft.com> | 2019-09-19 15:46:29 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-09-19 15:46:29 +0300 |
commit | 1256d6c8cf149306032677fa8e060a8de9e69de2 (patch) | |
tree | b9d2ae8c16e5dc979ea101dd014ce4d2408a8044 /mcs/class/System.Net.Http | |
parent | 12949cf2e65b02f7d67028187cc45f8d4bbc403e (diff) |
Use `NetworkStream` from CoreFX. (#16889)
* 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
Diffstat (limited to 'mcs/class/System.Net.Http')
-rw-r--r-- | mcs/class/System.Net.Http/FunctionalTests/functional-tests.sources | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mcs/class/System.Net.Http/FunctionalTests/functional-tests.sources b/mcs/class/System.Net.Http/FunctionalTests/functional-tests.sources index c0e4c682bd6..f655ee0735f 100644 --- a/mcs/class/System.Net.Http/FunctionalTests/functional-tests.sources +++ b/mcs/class/System.Net.Http/FunctionalTests/functional-tests.sources @@ -1,5 +1,6 @@ ../../test-helpers/Configuration.Certificates.cs ../../test-helpers/Configuration.Http.cs +../../test-helpers/NetworkStreamHelper.cs ../corefx/Interop.VersionInfo.cs ../corefx/PlatformDetection.cs |