Make sure to set SO_NONBLOCK on sockets whose timeouts are also set to 0.
Review Request #325 - Created June 7, 2011 and submitted
Stone Linden | Reviewers | ||
storm-1446 | oz.linden, Monty.Linden, kellylinden | ||
None | viewer-development |
Make sure to set SO_NONBLOCK, otherwise on Windows the sockets won't actually be non-blocking. See http://dev.ariel-networks.com/apr/apr-tutorial/html/apr-tutorial-13.html#ss13.4
My viewer works normally on Mac. Mostly this change applies to Windows, given the chart for 0 timeouts without SO_NONBLOCK.
Review request changed
Updated (June 7, 2011, 1:57 p.m.)
-
- added Diff r2
Header file changes to match.
With two suggestions: 1. Note in the .h that the only portable way to get a block-forever socket is to use a negative timeout value. 2. Make certain the indra/test/io.cpp unit test is being built and run. It's the only thing that exercises LLSocket in vitro.
Review request changed
Updated (June 7, 2011, 2:28 p.m.)
-
- added Diff r3
Header file notes per Monty's comment.
Review request changed
Updated (June 8, 2011, 12:22 p.m.)
-
None, actually.
My viewer works normally on Mac. Mostly this change applies to Windows, given the chart for 0 timeouts without SO_NONBLOCK.
Review request changed
Updated (June 27, 2011, 12:39 p.m.)
-
- added storm-1446
Attach to a bug.
Other reviews