Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Span overloads for Socket.SendFile #43846

Closed
geoffkizer opened this issue Oct 26, 2020 · 4 comments · Fixed by #47230
Closed

Add Span overloads for Socket.SendFile #43846

geoffkizer opened this issue Oct 26, 2020 · 4 comments · Fixed by #47230
Labels
api-approved API was approved in API review, it can be implemented area-System.Net.Sockets
Milestone

Comments

@geoffkizer
Copy link
Contributor

Proposed API

namespace System.Net.Sockets
{
    public class Socket
    {
        // Existing API
        // public void SendFile(string fileName, byte[] preBuffer, byte[] postBuffer, System.Net.Sockets.TransmitFileOptions flags);

        public void SendFile(string fileName, ReadOnlySpan<byte> preBuffer, ReadOnlySpan<byte> postBuffer, System.Net.Sockets.TransmitFileOptions flags);
    }
}
@geoffkizer geoffkizer added area-System.Net.Sockets api-ready-for-review API is ready for review, it is NOT ready for implementation labels Oct 26, 2020
@geoffkizer geoffkizer added this to the 6.0.0 milestone Oct 26, 2020
@ghost
Copy link

ghost commented Oct 26, 2020

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Oct 26, 2020
@geoffkizer
Copy link
Contributor Author

Related (async APIs): #42591

@gfoidl
Copy link
Member

gfoidl commented Oct 26, 2020

I can do this together with #42591 when this api is approved.
(need to finish something for work, then I'll complete the change for the async PR)

@terrajobst terrajobst added api-approved API was approved in API review, it can be implemented and removed api-ready-for-review API is ready for review, it is NOT ready for implementation untriaged New issue has not been triaged by the area owner labels Oct 27, 2020
@terrajobst
Copy link
Member

terrajobst commented Oct 27, 2020

Video

  • Looks good as proposed
  • We considered span-ifying the string parameter, but that feels contrived
namespace System.Net.Sockets
{
    public class Socket
    {
        // Existing API
        // public void SendFile(string fileName, byte[] preBuffer, byte[] postBuffer, TransmitFileOptions flags);

        public void SendFile(string fileName, ReadOnlySpan<byte> preBuffer, ReadOnlySpan<byte> postBuffer, TransmitFileOptions flags);
    }
}

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 20, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jan 25, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-approved API was approved in API review, it can be implemented area-System.Net.Sockets
Projects
None yet
4 participants