Home > other >  Qt can only listen to specify the IP server
Qt can only listen to specify the IP server

Time:09-23

Consult the QTcpServer, listen (address, the port), the address seems generally with Any and LocalHost,
If my client select only one IP, such as 192.168.1.13, listen I wrote (QHostAddress (" 192.168.1.13 "), 6666), when a client connection, prompt the connect refuse, who is a great god can explain ~ ~

CodePudding user response:

I tried also not line, tip the server address is not available. Always can't find the reason, can only listen to the local IP, localhost, or Any IP address with the IP address of the local, is not the IP address of the local newspaper that the above address is not available error,

CodePudding user response:

Localhost can?
  • Related