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 sendSizeAndMsgWithTimeout to send size and data in a single call #4985

merged 3 commits into from Feb 10, 2017


Copy link

@rgacogne rgacogne commented Feb 8, 2017

Short description

sendSizeAndMsgWithTimeout() groups the sending of the size as a uint16_t in network byte order and the corresponding data in a single sendmsg() syscall, handling short writes and timeouts if needed. It also supports optional source address and interface number. This PR makes use of this new function in the Remote Logger (protobuf) and dnsdist TCP workers.
It also adds TCP Fast Open support toward backends in dnsdist, if the MSG_FASTOPEN flag is available.


I have:

  • read the document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added regression tests
  • added unit tests

@ahupowerdns ahupowerdns merged commit 276ec09 into PowerDNS:master Feb 10, 2017
@rgacogne rgacogne deleted the write-single-syscall branch February 10, 2017 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants