QTcpSocket ConnectToHost()
-
I need to connect by ethernet to a generator using tcp/ip. I know it’s ip address only, I already tried basically used port like 80, I have tried to find its port using netstat and telnet but its error when I am trying to connect in the qt app, I also tried to find port in app, using qDebug when one of ports 1-65535 was opened.
App return like 8 different ports, but when I try to write data it says that socket is not connected
P.s. sorry for bad english -
I need to connect by ethernet to a generator using tcp/ip. I know it’s ip address only, I already tried basically used port like 80, I have tried to find its port using netstat and telnet but its error when I am trying to connect in the qt app, I also tried to find port in app, using qDebug when one of ports 1-65535 was opened.
App return like 8 different ports, but when I try to write data it says that socket is not connected
P.s. sorry for bad english@Vanius211
To connect to a host you must know what port number it is listening on. It's no use "guessing" it might be port 80. How can you have something you want to connect to without knowing its port number?If you can get it working with telnet on a port you should be able to do same from Qt.
-
@Vanius211
To connect to a host you must know what port number it is listening on. It's no use "guessing" it might be port 80. How can you have something you want to connect to without knowing its port number?If you can get it working with telnet on a port you should be able to do same from Qt.