Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Don't get available bytes for the socket unless we actually need the result#6835

Merged
ericeil merged 1 commit intodotnet:masterfrom
ericeil:RemoveAvailable
Mar 11, 2016
Merged

Don't get available bytes for the socket unless we actually need the result#6835
ericeil merged 1 commit intodotnet:masterfrom
ericeil:RemoveAvailable

Conversation

@ericeil
Copy link
Contributor

@ericeil ericeil commented Mar 11, 2016

While reading through the code I noticed that we're making unnecessary ioctl calls in Receive calls, to get the count of available bytes. This turns out to only be used if the caller supplied a list of buffers, which is not the typical case. This change moves the ioctl call so that it happens only if needed, which should help with throughput in most scenarios.

@stephentoub

…result

While reading through the code I noticed that we're making unnecessary `ioctl` calls in Receive calls, to get the count of available bytes.  This turns out to only be used if the caller supplied a list of buffers, which is not the typical case.  This change moves the `ioctl` call so that it happens only if needed, which should help with throughput in most scenarios.
@stephentoub
Copy link
Member

Nice. LGTM.

ericeil added a commit that referenced this pull request Mar 11, 2016
Don't get available bytes for the socket unless we actually need the result
@ericeil ericeil merged commit 56aacbe into dotnet:master Mar 11, 2016
@ericeil ericeil deleted the RemoveAvailable branch March 11, 2016 23:19
@karelz karelz modified the milestone: 1.0.0-rtm Dec 3, 2016
@karelz karelz added the os-linux Linux OS (any supported distro) label Mar 8, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Don't get available bytes for the socket unless we actually need the result

Commit migrated from dotnet/corefx@56aacbe
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Net os-linux Linux OS (any supported distro)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants