UDP transfer

Started by
2 comments, last by henryx 22 years, 5 months ago
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
HenryLecturer in Computer Games TechnologyUniversity of Abertay DundeeScotlandUK
Advertisement
That''s it.

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

http://www.ecst.csuchico.edu/~beej/guide/net/html/

At this time the page appears to be down for some reason.. Check back soon.
------------------------------------------------------------I wrote the best video game ever, then I woke up...
Thanks Galileo430,

got it working fine now.

henry
HenryLecturer in Computer Games TechnologyUniversity of Abertay DundeeScotlandUK
Thanks Galileo430,

got it working fine now.

henry
HenryLecturer in Computer Games TechnologyUniversity of Abertay DundeeScotlandUK

This topic is closed to new replies.

Advertisement