Jump to content
  • Advertisement
MiXen

Sending and receiving UDP broadcast message in C++ in Windows Phone.

Recommended Posts

Hi!

I looking for example of sending and receving UDP Datagram broadcast message. I only find examples in C#, but I write my project in C++ and I don't know, how can I rewrite it. I know, that I must use DatagramSocket class. Maybe someone has similar problem. Thanks for ony help.

 

Share this post


Link to post
Share on other sites
Advertisement

Ehh... In windows phone I cannot use clear WinSock. I must use DatagramSocket. I write it clearly before, please read carefully first.

Share this post


Link to post
Share on other sites

Yes, I look it there, but I'm new in internet programming, so I can't remake this sample in that way, that I want. Maybe do you have something closer to my problem?

 

According to my previous post to person, that gave me minus point, come on! I get drawbacks for what? For saying, that moderator isn't read carefully? No comment...

Share this post


Link to post
Share on other sites

 

I look it there, but I'm new in internet programming, so I can't remake this sample in that way, that I want. Maybe do you have something closer to my problem?

 

 

In that case, start here.

 

That information on those links have helped thousands of people do what you wanted to do.  

 

It requires work. There is no magic component you can download that does everything for you. The information is generic and applies to most situations, you must take the information, do some work, and turn it into something that works in your product.

 

 

Some follow up questions:

 

What have you actually done so far? What books, tutorials, and documentation have you already used and exhausted? What FAQs have you read? 

 

And most importantly: What SPECIFICALLY about it does not work for you?   That is, when you attempted to implement it in your program, what specific parts failed?

Share this post


Link to post
Share on other sites

Ok, maybe nobody didn't make it for me, but giving me minus point for saying truth is ridiculus.

 

Backing to threat, I started from remake this datagram sample and I have one big problem, that broadcasting isn't working. My computer has adress in LAN:192.168.2.103, when I set this in program, I get message sending by its, but when I set brooadcasting adress 192.168.2.255 or 255.255.255.255, I didn't get message in this sample, can anybody help me with it?

Share this post


Link to post
Share on other sites
Only omniscient beings, oracles, and time travelers can help you if you don't post your code...

Share this post


Link to post
Share on other sites
Did you enable broadcast on the socket?
What tool do you use to test whether it "works" or not?
What does Wireshark say about outgoing UDP packets while you're trying to broadcast?

Also, there are more examples of this, such as: http://metronuggets.com/2013/03/18/how-to-send-and-receive-a-udp-broadcast-in-windows-phone-8-and-win8/
If you run this code, does that work? If so, what's different about your own code?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!