Adds the option to disable Nagle's algorithm. This is handy for sending a burst of very small TCP packets where latency matters. Since this is the first option, I'm not sure how we should handle configurations. Thoughts on this?
Add TCP no delay option.
This would be great to bring in, I also use this option in a version of CocoaHTTPServer to deal with an interaction between delayed ACKs and the server using separate writes for the headers and data. Couple comments:
Use existing config and adjust style.
Use tabs instead of spaces.
Thanks for your feedback. I just updated the PR. Any additional thoughts? I assume it is safe to call setsockopt on a non NULL socket at any given time?
I think maintaining the setsockopt() call when the socket is created as you had before would be useful. Then you can set the option at any point - if the socket is not created yet the option will be set when it is, if the socket already exists then the option is set immediately.
In the getter it looks there is a kIPv6Disabled that should be kTCPNoDelayEnabled.
And yep, calling setsockopt() for any socket state will be fine, the function will return an error if it's unable to set the option.
Finally got around to address your feedback. Do you have any further suggestions?
Nope, this looks good to me!
What needs to happen to get this merged in?
@robbiehanson needs to review and merge
@matthiasplappert @mattstevens Can you rebase this off the latest master and squash your commits? Thank you!
Add TCP no delay option #130
(I am new to GitHub so I can only hope that I am going to put this comment where it actually belongs:)
Anyways, just wanted to say that I would also be very much interested in the "no_delay" feature. (I tried to include it myself based on the code by matthiasplappert but failed.) Now I am wondering, what are the chances that such a option will actually be included in v7.5.2? (If this is not going to happen, can you maybe recommend another library for iOS that supports "no_delay"?)