dotnet-core/release-notes/2.1/api-diff/2.0-vs-2.1_System.Net.Sockets.md

27 lines
1.3 KiB
Markdown
Raw Normal View History

2018-05-26 00:28:02 +02:00
# System.Net.Sockets
``` diff
namespace System.Net.Sockets {
public class Socket : IDisposable {
+ public int Receive(Span<byte> buffer);
+ public int Receive(Span<byte> buffer, SocketFlags socketFlags);
+ public int Receive(Span<byte> buffer, SocketFlags socketFlags, out SocketError errorCode);
+ public int Send(ReadOnlySpan<byte> buffer);
+ public int Send(ReadOnlySpan<byte> buffer, SocketFlags socketFlags);
+ public int Send(ReadOnlySpan<byte> buffer, SocketFlags socketFlags, out SocketError errorCode);
}
public class SocketAsyncEventArgs : EventArgs, IDisposable {
+ public Memory<byte> MemoryBuffer { get; }
+ public void SetBuffer(Memory<byte> buffer);
}
public static class SocketTaskExtensions {
+ public static ValueTask<int> ReceiveAsync(this Socket socket, Memory<byte> buffer, SocketFlags socketFlags, CancellationToken cancellationToken = default(CancellationToken));
+ public static ValueTask<int> SendAsync(this Socket socket, ReadOnlyMemory<byte> buffer, SocketFlags socketFlags, CancellationToken cancellationToken = default(CancellationToken));
2018-05-26 00:28:02 +02:00
}
+ public sealed class UnixDomainSocketEndPoint : EndPoint {
+ public UnixDomainSocketEndPoint(string path);
+ }
}
```