On Thursday 16 July 2009 15:45:19 Antoine van Gelder wrote:
But that is a choopchick and not really important one way or another, I think we both agree that switching to blocking sockets is a promising idea.
Does anyone with insights into the gooey innards of vis.c have any thoughts about this strategy?
I did some little research and noticed that the non-blocking clients were introduced by me in revision 491. After reading the commit message I roughly remember the reason for the change to non blocking: We were working on the 3D visualization tool s3d and could bring the vis server to a standstill by running the TCP client (meshs3d) in gdb and stopping its execution. The TCP client was not killed but the client would not read from the socket, hence the TCP connection was still open but the TCP write call would not come back either and hang forever. This solution was a quick fix which probably is far from being perfect.
While searching for some info on that topic I found an interesting page which might prove helpful: http://blog.netherlabs.nl/articles/2009/01/18/the- ultimate-so_linger-page-or-why-is-my-tcp-not-reliable
Regards, Marek