Threads and sockets
Hi all...
I have a question when using sockets in threads.
I have a class "A" that creates another "B" in a thread. B then creates a server side socket.
B is global in A.
If the thread in A exits I get an error saying that I/O request failed because a thread exited or an application request it.
If I include a sleep in the thread so it does not exit, it works fine.
Can anyone explain me this behaviour of threads and sockets?
Thanks.
Regards,
Sandra
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

AdministratorRank #675 · 3.6K reputationPosted Apr 15, 2003, 7:07 AM EDT