4 ms·
Sounds good. Please add a flushHint() call as well: http://www.forwardscattering.org/post/3 http://www.forwardscattering.org/post/3
by Ono-Sendai 10y ago
Sounds good. Please add a flushHint() call as well: http://www.forwardscattering.org/post/3 http://www.forwardscattering.org/post/3
- astrange 10y agoAlready exists in popular implementations: https://t37.net/nginx-optimization-understanding-sendfile-tcp_nodelay-and-tcp_nopush.html https://t37.net/nginx-optimization-understanding-sendfile-tc...
- rumcajz 10y agoThe interesting question here is: Once we have flush() function does that means that protocols are allowed to delay data indefinitely if flush() is not called?
- Ono-Sendai 10y agoYeah that is an interesting question. I think if the provider of the socket interface could be sure that the client code using the interface would know about flush(), then it wouldn't need to set timers or anything like that to flush after X ms etc. However there wouldn't be any point, I think, to buffering up more than e.g. a MTU worth of bytes. So it wouldn't be delaying indefinitely.