🎉 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!

closesocket() an async socket after using sendto()

Started by
2 comments, last by hplus0603 9 years, 2 months ago

using UDP

The other PC will not recv this sendto because I called closesocket after.

is there any way to make the other PC recv this sendto?

appart from using sleep() between sendto and closesocket...

Advertisement
Look at the shutdown() call.
enum Bool { True, False, FileNotFound };

what I really want to do is stop recvs and sento in a socket if I press a button(shutdown()) but

If i press the button again I want to enable recvs and sento again

for this is WSAAsyncSelect() what I have to use?

If that's what you want, I would keep receiving data, and just discard it if I'm in the "ignore" state.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement