Applications running on the web platform are sandboxed, and this applies to network connectivity as well. Many standard protocols such as DNS and TCP sockets are not directly available (but see below):
We are looking at several options:
1) Use QNetworkAccessManager to make requests back to the origin server. This maps to the native XMLHttpRequest or Fetch APIs. Status: Pending for 5.12
2) Use QWebSocket to make WebSocket connections to any host. Connecting by host name works; the browser will resolve the hostname. Status: merged for 5.12
3) Use QTcpSocket to make a TCP connection to a forwarding server that runs e.g. websockify. This tunnels TCP traffic over WebSocket, which again means that connecting by hostname is OK. Status: under dev/testing, emscripten claims to have support.
Future Tech 4) Look at WebRTC for peer-to-peer communication. We could possibly tunnel TCP connections to other application instances.