my tcpServer is returning null as its own serverAddress 0.0.0.0
my tcpServer is returning null as its own serverAddress 0.0.0.0
There is a reason for that: QTcpServer::serverAddress()
even though the desktop client is getting connected to 127.0.0.1
If QTcpServer::serverAddress() is returning QHostAddress::Null then it is not listening and the client cannot be connecting to it.
If QTcpServer::serverAddress() is returning QHostAddress::Any, i.e. typically depicted as 0.0.0.0 (IPv4) or :: (IPv6), then it is listening on all interfaces. This will be because you listened without specifying the address of an interface to bind to.
Bookmarks