Skip to main content
GameDev.net gamedev.net
šŸ”’ Locked

Socket Close

Started by Shannon Barber Oct 19, 2000 at 7:41 PM 3 replies 550+ views
Original Post
Shannon Barber
Shannon Barber
How are you supposed to detect a socket close with CSocket? There''s an OnClose method, but it never gets called when I override it... Server Socket, accepts incoming connection from the Client Socket, and sets up a Receive Socket. When the client socket closes, how does the receive socket know?
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
JonStelly
JonStelly
Did you register for FD_CLOSE notification like a good little winsock programmer? =)
Shannon Barber
Shannon Barber
Do I need to do that with MFC ie CSocket?
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
SiCrane
SiCrane
You shouldn''t need to register the FD_CLOSE event manually, the framework should handle it. It''s probable that the OnClose handler you created is attached to the listening socket rather than the socket descripter created by the call to Accept.
Shannon Barber
Shannon Barber
I''m not sure what I did, but it works now...

maybe i had the breakpoint on the wrong OnClose... I code so much better after sleep...
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.