An Tao
An Tao
这样是增加了爆的风险,试试我说的方案,定时器到时调用app().quit()
@prothegee Thanks so much for your patch. I noticed that there is currently a reverse proxy example in the example directory. Is your example different from it? Can you consider...
@prothegee Thank you for your patient explanation, I will accept this PR after some code review
Based on the above discussion, I think creating a new drogon-examples repo is a solution acceptable to everyone. I will do it ASAP.
Sorry, the documentation on this topic is very lacking. I have added a prometheus example for your reference. #2076
> How would I add PromStat as global middleware? the GlobalFilters plugin doesnt support this I dont think. The middleware is a new feature added to drogon, now you can't...
崩在jsoncpp库里了,这种通常是由于兼容性问题造成的,比如你使用的jsoncpp的头文件和连接的jsoncpp的so文件版本不匹配。
看调用堆栈还没到parse那步呢,尝试下升级jsoncpp库
> @an-tao [ resp->parseJson();](https://github.com/drogonframework/drogon/blob/a2f759e4cd9d40a772a0f3006430d867c72e8f28/lib/src/HttpClientImpl.cc#L566) 可以在这添加一个开关来关闭它吗, 每次响应它都会自动解析 json, 这对于不需要使用getJsonObject()的用户似乎是不必要的开销 可以的,你提PR吧,仿照server端处理request的方式,延迟parse
一个httpClient对应一个TCP连接;复用它TCP就会保持,直到服务端主动关掉。 bethebest0622 ***@***.***> 于2024年6月13日周四 18:14写道: > 你好,我的场景是 不定时的向同一服务器发送http请求 > > 我非常在意延迟,所以我希望尽可能的复用已经创建的tcp连接 > > 我的问题是: > 在drogon执行http请求的时候 有两个对象需要创建 HttpClient和HttpRequest > > 那么,tcp连接是创建在HttpClient这个维度上还是HttpRequest呢? > > 复用同一个HttpClient,每次请求都创建一个新的HttpRequest这样会复用之前的tcp连接吗? > > 或者,复用HttpRequest 才可以达到复用连接的效果呢? > >...