Jump to content
  • Advertisement

Archived

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

sfxman

Question on UDP with IPV6

This topic is 6106 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''m develloping a network library for my game and i have a probleme when working with udp. I''ve seen in examples from microsoft that they use udp transmissions with send and recv instead of sendto and recvfrom, but i''d like to use recvfrom and sendto anyway (for multicast support (maybe i''m wrong, tell me ...)). The probleme is when i try to send a datagram on a multicast group, the send function doesn''t work (no address given it says (last err : 10057)). Can someone give me some pointers about this problem ? Maybe i can change the use of the socket back from send to sendto ? That way it would work better i gues, but i can''t figure out how to get the address out of the SOCKADDR_STORAGE structure ... Any help would be appreciated ! :-) Thanx in advance ! Matt

Share this post


Link to post
Share on other sites
Advertisement
I''m not an expert on this, but I think its against the design of UDP to send() data on a UDP socket. UDP sockets are unconnected sockets so you have to use sendto(). What MS samples are you talking about?

Also, are you building your sockaddr structure? You have to do that before you connect in the first place (if you''re using send()). If you''re using sendto(), you have to build it and pass it as an arg. What do you mean you''re having a hard time getting the address from it? You should already have it. Let me know more...

-Fred

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!