Local IP Address
Unsolved
Qt for WebAssembly
-
Working on a project that needs to be cross-platform (ie, Web, Mobile, Desktop)... so I'm using Qt for WebAssembly.
I need to find the local IP address of the device the app is running on. Works well using this:
emscripten::val location = emscripten::val::global("location") QString host = QString::fromStdString(location("hostname").as<std::string>());
However, I need to 'find' a few specific endpoints on the network, based on the 'host' from above.
I run loop using QNetworkRequest and check the QNetworkReply... but cannot get the IP address of the responding device.
These both return blank in WASM, but the correct IP in Android/Windows:
reply->request().url(); reply->request().url().host();
Any ideas why?