| Reinhard Eilmsteiner 2004-04-20, 4:34 pm |
| Hello Everybody!
I just set up a couple of objects for network communication (as a
library). I use socket-, signal handler-, thread-objects etc. to realize
a TCP-Server.
I put the listening socket into the non-blocking asynchronous state
using flags O_NONBLOCK and O_ASYNC and set the owning thread to the
caller using F_SETOWN. The thread that calls all the necessary functions
on the listening socket is the main thread of the server.
Everything works so far: The consequent accept calls work asynchronously
from all the listener threads created (using libpthread) from the main
thread.
After the accept I start yet another thread for each incoming
connection, passing the accepted socket on to it.
The new thread does exactly the same with its socket as the main thread
did with the listening socket, but: somehow no SIGIOs are sent to any of
the threads (even without filtering).
What's wrong?
If I don't use Async-IO everything works fine.
Any ideas?
Regards and thanx,
Reinhard.
|