Add a polling loop in main to read from more than one socket at once. Add the O_NONBL...
authorJoe Mason <jmason@rim.com>
Thu, 2 Aug 2012 21:22:46 +0000 (17:22 -0400)
committerJoe Mason <jmason@rim.com>
Thu, 2 Aug 2012 22:52:38 +0000 (18:52 -0400)
commit674da8ae07e3780b393bd1aebb7b7f973433c29f
tree80ff66d2114e40addd453718b63104f9fd7c4ee2
parent84490052d45bb55dd12e82b1874d7bbb2897c0d1
Add a polling loop in main to read from more than one socket at once. Add the O_NONBLOCK and
SO_KEEPALIVE flag to all sockets. Note that several loops which used to continue on a return value
of 0 (theoretical since 0 would never be returned without O_NONBLOCK) now break on 0 so that they
won't continue reading until after poll is called again.
tests/server/sws.c