Qt HTTP 服务器? [英] Qt HTTP Server?

查看:51
本文介绍了Qt HTTP 服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个小型 HTTP 服务器应用程序,它接收 HTTP GET 请求、处理它们并发出回复.由于应用程序的历史,我更愿意为此使用 Qt,但我只能找到另一个(更常见的)方向:向服务器发送请求并使用 QNetworkAccessManager.我需要的是像套接字这样的东西,当请求进来时,它会生成一个对象,我可以在其中选择该请求的 url 等,以便我可以发送适当的回复.

I'd like to write a small HTTP server application that receives HTTP GET requests, processes them and sends out a reply. Because of the history of the application I'd favor using Qt for this, but all I can find is the other (more common) direction: Send a request to a server and receive a reply using QNetworkAccessManager. What I need is something like a socket that, when a request comes in, produces an object where I can pick url etc. of this request, so I can send out an appropriate reply.

我是瞎了眼还是在 Qt 框架中没有这样的东西?如果是这样,您能推荐替代方案吗?

Am I just blind or is nothing like this in the Qt framework? If so, can you recommend alternatives?

推荐答案

我发现了这个https://github.com/vinipsmaker/tufao ,这是一个迟到的答案......不确定它是否有帮助.

I found this https://github.com/vinipsmaker/tufao , Its a late answer .. not sure if it helps.

这篇关于Qt HTTP 服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆