-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Function disable_nagle
moved to Sockets and documented
#31924
Function disable_nagle
moved to Sockets and documented
#31924
Conversation
Nitpick: Spelling of "disable_nagle" in commit message Also, probably should have a NEWS entry? |
diable_nagle
moved to Sockets and documenteddisable_nagle
moved to Sockets and documented
How about changing the API to |
c596af2
to
9b71e13
Compare
@jpsamaroo thanks, I've fixed the commit message (and the PR title). I haven't exported If we are going to change the API, then maybe we should stay closer to the naming from libuv? For example |
Ok, two functions sounds fine. |
OK, if you don't like |
…1842 ) disable_nagle was split into nagle (which enables or disables Nagle's algorithm) and quickack (which enables or disables TCP_QUICKACK on Linux systems).
9b71e13
to
ecde2ab
Compare
I've split |
""" | ||
function nagle(sock::Union{TCPServer, TCPSocket}, enable::Bool) | ||
# disable or enable Nagle's algorithm on all OSes | ||
ccall(:uv_tcp_nodelay, Cint, (Ptr{Cvoid}, Cint), sock.handle, Cint(!enable)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error checking of return value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I'll make a separate PR for this.
I've moved the
diable_nagle
functions from Distributed to Sockets, as suggested in #31842 . I was trying to make the PR small, so:disable_nagle
precompile statements should probably go to the Sockets stdlib.getsockopt
to test that an option is actually set.