My computer is IP on the local network 192.168.0.100 , I am running my QTcpServer using
if (!tcpServer->listen(QHostAddress::LocalHost, 1234)) {
When I try to connect to it using netcat 192.168.0.100 1234 , the connection is rejected, but netcat localhost 1234 succeeds.
At the same time, if I listen using netcat -l -p 1234 , I can connect to both 192.168.0.100 and localhost without any problems.
It makes me scratch my head, why is this happening?
source share