Original Post
Let''s say thread B sits on a blocking connect() or accept(), and then thread A comes and close the socket in question. What happens? Will connect()/accept() return with an error, or will hell break loose? Is the behaviour defined, or is this forbidden?
I''m particulary interested in those two functions, but also in lesser degree how recv() and send() etc. react when a the socket they''re operating on suddenly is closed. Will closesocket() perhaps wait until they are done, or "queue" the closing. Can someone shed some light on this?
Thanks.