🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Socket Close

Started by
3 comments, last by Shannon Barber 23 years, 8 months ago
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
Advertisement
Did you register for FD_CLOSE notification like a good little winsock programmer? =)
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
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.
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

This topic is closed to new replies.

Advertisement