-
Notifications
You must be signed in to change notification settings - Fork 93
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
set_socket_non_blocking() is commented out in udpstream.c #60
Comments
@glima , do you know why? |
@simonxiaoss seems to the one last editing those bits (and to be honest I barely know this code base) |
Thanks @glima. I also noticed from "Add support for UDP in IPv4" PR (June 25,2016) which added the udpstream source files, that set_socket_non_blocking code was already commented out from the beginning. It's never been enabled. @simonxiaoss, is there any concern if non_blocking socket mode is enabled for UDP ? |
To be frankly, the UDP processing is not completely implemented and not well tested. This initial version is just a simple duplication of the TCP stream with blocking mode. Yes, we should set the UDP socket as "O_NONBLOCK", and also handle it properly when we receive the data. We should combine the code and use a unified way to process TCP/UDP too. |
Hi @santoshx , I recalled you have worked on this trying to enable nonblocking mode for UDP socket, but you encountered some issue. Do you have any update? Thanks. |
In udpstream.c, the set_socket_non_blocking() call is commented out. Any reason why?
I thought non-blocking I/O is the only default I/O model implemented ntttcp-for-linux, and it is better for Tput performance (than blocking I/O). The tcp mode is still setting non-blocking socket mode.
Can we uncomment it?
The text was updated successfully, but these errors were encountered: