Asynchronous accept() with posix sockets.
Hi! I know it is possible to use asynchronous I/O with read/write, but is it possible to accept incoming connections when they arrive and still do other things in the meantime without using multithreading and without having to periodically check with accept function (non-blocking mode)?
Usually you do sth like this: Code:
int main() Code:
void func() |
If you're willing to use a select() loop, then:
|
AFAIK I could as well use accept with non-blocking mode to poll for waiting connections, but still its non blocking and what I want is asynchronous (like receving SIGIO whenever someone tries to connect so that I can accept it). Unfortunatelly due to some hardware problems I can't test it now. Thanks for your help anyway.
EDIT: I think that I what I want can't be done :( marking the thread as solved. |
All times are GMT -5. The time now is 03:49 AM. |