🎉 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!
Using send and recv (winsock)
could someone give me and example of using send and recv with winsock? Assume I have a socket connected and everything else set. I''d just like to see how to send a random number, and/or a string.
Thanks for any help.
Dave Ratti
in both borland c++ and visual c++, there are examples
of server/client apps that use winsock for sending and
receiving. They''re called chatsrvr and chatter, they
contain the basics.
of server/client apps that use winsock for sending and
receiving. They''re called chatsrvr and chatter, they
contain the basics.
You can also find these examples on the web at...
http://msdn.microsoft.com/library/default.asp?URL=/library/devprods/vs6/visualc/vcsample/_sample_mfc_chatsrvr.htm
Concider using select() or ioctlsocket() to aid you in setting timeouts for send and recv.
http://msdn.microsoft.com/library/default.asp?URL=/library/devprods/vs6/visualc/vcsample/_sample_mfc_chatsrvr.htm
Concider using select() or ioctlsocket() to aid you in setting timeouts for send and recv.
I got my first taste of sockets by making a Battle.net bot
You can get the sample code (including working sockets) from www.battle.net. Follow the download links, then look for greetbot.
--------------------
You are not a real programmer until you end all your sentences with semicolons;
![](smile.gif)
--------------------
You are not a real programmer until you end all your sentences with semicolons;
Visit the ROAD Programming Website for more programming help.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement