Search code examples
javasocketsdartclientdatagram

Java DatagramSocket, Dart ClientSocket


I'm working on a project which contains 1 Java server, 1 Android client, 1 Dart web client and 1 Java client. I got the Java server and client finished and working. Now I want to get started with the Dart client.

What's the best way to go so I can let Dart communicate with the Java DatagramSocket?

Thanks in advance!


Solution

  • You can write a Chrome App, which can access UDP and other networking APIs (datagrams).

    Unfortunately, a URL-based web app cannot access UDP. As mentioned in another answer, the browser can do HTTP(S), Web Sockets, and WebRTC data channels.