GithubHelp home page GithubHelp logo

Comments (6)

188080501 avatar 188080501 commented on July 23, 2024

关于JQNet的HTTP模块,设计本意只是一个简单的封装,放入这里也是为了配合测试所用。模块里面没有判断底层网络情况,只依赖Qt那边的error,所以如果Qt没有error信号就不会返回

from jqhttpserver.

188080501 avatar 188080501 commented on July 23, 2024

你这边遇到的是什么情况?我这里看看如何复现

from jqhttpserver.

moruoxian avatar moruoxian commented on July 23, 2024

你这边遇到的是什么情况?我这里看看如何复现

关于JQNet的HTTP模块,设计本意只是一个简单的封装,放入这里也是为了配合测试所用。模块里面没有判断底层网络情况,只依赖Qt那边的error,所以如果Qt没有error信号就不会返回

好吧 谢谢 这个库在网络可达的情况下确实很好用 就是有时候纯内网环境情况下 请求外网restful一直阻塞感觉挺别扭的。。

from jqhttpserver.

moruoxian avatar moruoxian commented on July 23, 2024

你这边遇到的是什么情况?我这里看看如何复现

关于JQNet的HTTP模块,设计本意只是一个简单的封装,放入这里也是为了配合测试所用。模块里面没有判断底层网络情况,只依赖Qt那边的error,所以如果Qt没有error信号就不会返回

好吧 谢谢 这个库在网络可达的情况下确实很好用 就是有时候纯内网环境情况下 请求外网restful一直阻塞感觉挺别扭的。。

我们采用了这种方法. 在调用http请求之前先通过tcp 判断一下端口是否通 然后再请求。
QTcpSocket *s = new QTcpSocket();
QObject::connect(s, &QTcpSocket::connected, = {
emit netOk();
}
s->deleteLater();
});
s->connectToHost(url.host(), url.port());
成功解决超时问题。

from jqhttpserver.

188080501 avatar 188080501 commented on July 23, 2024

之前忘记说了,在JQNet里面有tcpReachable可以用来判断网络可达性

from jqhttpserver.

188080501 avatar 188080501 commented on July 23, 2024

如果问题解决了,那我先关闭这个issues了

from jqhttpserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.