Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


UDP transfer

This topic is 6163 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have a simple client-server TCP/IP server working ok and I now want to change it over to the UDP protocol rather than TCP but I am having a few problems - possibly because I''m not 100% sure about what is required when establishing a UDP connection. Can anybody tell me if this is the correct method. 1. Start up winsock on both applications 2. Create sockets of type SOCK_DGRAM on each application 3. Bind sockets on both applications 4. Use sendto and recvvfrom to send and recieve data. Am I missing anything. I think I am correct in that there is no need to listen() and connect() with a UDP connection. Is it correct to send and recieve over the one socket that has been created on each application. This is just a win32 console application at this stage. I can post some code if needed but your help on these concepts would be appreciated so I can see if I''m on the correct track. Thanks henry

Share this post

Link to post
Share on other sites
That''s it.

If you want to check your code against something that works.
You can find a UDP client / server here.


At this time the page appears to be down for some reason.. Check back soon.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!