DatagramSocket sample

This sample shows you how to a use datagram (UDP) socket to send and receive data using the DatagramSocket and related classes in the Windows.Networking.Sockets namespace in your Windows Runtime app.

 
 
 
 
 
(0)
17,877 times
Add to favorites
4/2/2014
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • UAP does not receive data from WPF
    1 Posts | Last post August 25, 2016
    • The UAP receiver does not receive data from the WPF sender.
      
      I've tested UAP-UAP, UAP-WPF, WPF-WPF (where the first is a sender, and the second is a receiver).
      
      All on the same machine (using localhost) and all works fine. 
      
      But not WPF-UAP. No exceptions, just silence.
      
      Is there any solutions?
  • Can not Receive
    2 Posts | Last post August 25, 2016
    • WPF is the sender, winRT is the Receiver
      when run at one computer, winRT can not Receive
      but run at two computer ,it is OK
      has any solution?
    • Hi! It's over 2 years to your question, but it still unanswered. 
      
      I've stuck with the same problem. 
      
      The UAP receiver does not receive data from the WPF sender. I've tested UAP-UAP, UAP-WPF, WPF-WPF (where the first is a sender, and the second is a receiver). All on the same machine (communicating through localhost) and all works fine. But not WPF-UAP. No exceptions, just silence.
      
      Did you find solution or did you use something else? 
  • missing something?
    1 Posts | Last post February 14, 2016
    • I have found a ton of udp examples that let my app send messages... to itself.  I have yet to find a single working example of a working windows 10 universal app that can broadcast udp to a device other than itself.  I feel like I'm taking crazy pills, that am I missing?
      
      if I run this app on two devices and neither get messages from each other, but they do get their own back, do I assume its the network or is it the code?
      
      I really hope someone can help 
  • missing something?
    1 Posts | Last post February 14, 2016
    • I have found a ton of udp examples that let my app send messages... to itself.  I have yet to find a single working example of a working windows 10 universal app that can broadcast udp to a device other than itself.  I feel like I'm taking crazy pills, that am I missing?
      
      if I run this app on two devices and neither get messages from each other, but they do get their own back, do I assume its the network or is it the code?
      
      I really hope someone can help 
  • Bug in JS version
    2 Posts | Last post December 12, 2013
    • startListener.js has a bug in function echoMessage()
      This will fix it
      socketsSample.displayStatus("Got datagram from " + eventArgument.remoteAddress + ":" + eventArgument.remotePort +
                      ", but already 'connected' to " + socketsSample.listenerPeerAddress + ":" + socketsSample.listenerPeerPort);
    • Good catch! The new Windows 8.1 sample doesn't have this bug :-)
  • Bug
    2 Posts | Last post December 12, 2013
    • There's a bug in Scenario1.xaml.cs line 144: Index is wrong. Replace {3} with {2} in string format or app will crash when connecting to the service from a different PC.
    • Thanks for the feedback! The new Windows 8.1 sample doesn't have this bug :-)
  • Availability of DatagramSocket class
    1 Posts | Last post February 24, 2013
    • I am puzzled by the documentation for DatagramSocket. Please take a look at this MSDN Tech Discusion I posted and if possible explain what I'm doing wrong?
      
      http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/a42897c2-c304-48bc-a7dc-83abbb35fab0
      
      Thanks