Small TCP problem

Started by
2 comments, last by matt_j 19 years, 11 months ago
Hi, I''m making a small simple TCP lobby server. I''ve noticed that when I close a socket after a client unexpectedly disconnects (error 10054), that reconnecting also causes a 10054 error when trying to recieve from that socket. These sockets are non-blocking.
Advertisement
Once a socket is has been closed, you have to create a new socket, either for listening or for connecting.

Kuphryn
If I change the handle of a closed socket after using accept with my listen socket, would that work, or do I need to open it before setting the handle?
Yes, assigning a handle to a closed socket, which in this case is an invalid handle, to a valid socket return from accept API is okay.

Kuphryn

This topic is closed to new replies.

Advertisement