• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
2
Question by sirius_black9999 · Jun 26, 2016 at 10:21 PM · networkingcommunicationcrossplatformwindows phoneudp

(C#) UDP broadcast between unity editor and windows phone

Hello,

For a game i'm currently making i want to broadcast an UDP message from desktop across LAN to a windows phone which is listening for incoming UDP messages

From what i've gathered so far, windows phone should use a Windows.Networking.DatagramSocket while desktop should use System.Net.UdpClient

the reason for this is that System.Net.UdpClient does not exist in NetCore (or in windows phone's mono compiler), while Windows.Networking.DatagramSocket does not exist in "regular" mono

The code i have appears to be functioning (there are no errors) however the phone does not see any incoming messages

I have checked both devices' local IP adresses, and desktop is on 192.168.0.3, The phone has 2 ip adresses associated with it, one likely being the mobile data connection and the other is the wifi at 192.168.0.8

here is the full implementation of the sender (desktop) and receiver(phone) classes: http://pastebin.com/H0KGMz0B

Thanks in advance for any help with this

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Joe-the-programmer · Dec 30, 2016 at 10:33 AM 0
Share

Have you managed to find a solution yet? It must be possible as unity's NetworkDiscovery uses UDP broadcasting to find other devices on the network. I would use that but I find that it hardly ever actually works.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

78 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

UDPClient can't receive and send ? 0 Answers

HELP! Interactive instalation- networking 0 Answers

UDP Client receiving Disposed error 0 Answers

RPC isn't called when windowns lose focus 0 Answers

Unity Socket Port-forward 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges