How to change QTcpServer to http web server?



  • For now ,after several questions , i finally build a distributed system based on qtcpsocket. but here comes big problem , the master node build as a TCP server. But we want to overview data from website , so how to change the tcp server to http server?

    for now ,only two way i have thought of :

    1. add other c++ http webserver library to project handle this . but can't choose the best library to achieve this .
    2. use most frequent use web server framework,and pass the data to the webserver progress . but in my project ,master get data from slave nodes almost every second ,after some calculation ,then pass the data to webserver progress . but this way seems has much latency . if need choose ,which framework can work well with qt qtcpserver?

    any other solution also be welcomed .

    --------update--------------
    after some search work ,we decided to use qwebsocket to finish the work(most because of need transfer real-time data ) .but here comes the another problem , which data format to choose ?self customized serialized object or json? and can json work with websocket ?



  • Hi! Have a look at QHttp it's quite popular.



  • @Wieland thanks,i will have try.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.