Solved Listen to Http server by QTcpSocket
-
Could I listen to http sever by QTcpSocket?I have use QNetworkAccessManager to download resource from http server, but never tried to listen to the server, any examples/suggestions about this?
Could I just call
socket_->connectToHost(ip_address, port);
To listen the messages send from the server?If this work, do it have any drawback? Any pitfalls I should notice? Thanks
-
Hi @tham
there are the famous fortune telling examples:
Server: http://doc.qt.io/qt-5/qtnetwork-fortuneserver-example.html
Client: http://doc.qt.io/qt-5/qtnetwork-fortuneclient-example.html-Michael.
-
@m.sue It works for http server too?
-