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

Sending with Asynchronous Sockets

Started by
2 comments, last by jacksonh 22 years, 10 months ago
I know how to accept, recieve, and read with Asynchronous sockets but I am not sure how I should be sending data. If I call send() does it send the data right away or does it just post a FD_WRITE message, and than I send it in my FD_WRITE handler? Should I be using WSASend() instead of send()?
Advertisement
Just use send();
But if I just use send() does the data get sent right away? Or do I have to do something in FD_WRITE?
The data is sent right away. You have to be careful, because if the other end is a bit slow, then it''s buffer may fill up, and send() will block until the other end is ready. That''s no good if you need to be doing other things. Generally, send() is OK though. Especially if you receive lots and send little.

codeka.com - Just click it.

This topic is closed to new replies.

Advertisement