Hi!
I understand how asynchronous sockets work. But what about funcions that cause a delay or block the program, like connect() ?
I used this kind of sockets on my Gnutella and Im having trouble with connect(), which blocks until it gets a response or a time out (that could be more than 2 minutes).
Should I create a new thread to handle this kind of functions or is there a way not to use threads at all? |