Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Can we add an overload with a ReadOnlyMemory<byte> parameter to System.Net.Socket.SendToAsync()? #1712

Closed
ohsorry opened this issue Feb 19, 2020 · 1 comment

Comments

@ohsorry
Copy link

ohsorry commented Feb 19, 2020

public static Task<int> SendAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags);
public static Task<int> SendAsync(this Socket socket, IList<ArraySegment<byte>> buffers, SocketFlags socketFlags);
public static ValueTask<int> SendAsync(this Socket socket, ReadOnlyMemory<byte> buffer, SocketFlags socketFlags, CancellationToken cancellationToken = default);
public static Task<int> SendToAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP);

See ? I guess we need one. :)

@stephentoub
Copy link
Member

Dup of dotnet/runtime#938.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants