ithewei

Results 131 comments of ithewei

You can also use AsyncClient directly.

可以参考[examples/nmap](https://github.com/ithewei/libhv/tree/master/examples/nmap),就是在loop里群发icmp包,来探测局域网在线IP

通过req->body或者resp->body拿到原始的字符串数据,使用自己喜欢的json库解析生成即可

是的,这么看来,WebSocketClient里没法使用isReconnect获取是否是重连上的,只能外部自己在onopen、onclose回调里自己记录下了

根据 [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3.4) 标准定义,URI 的通用语法结构为: scheme:[//authority]path[?query][#fragment] (方括号表示可选,但顺序不可调换)

resp->Dump(true, false),打印下整个响应头看看

成功回调最终是调用这里,上面是有判断解析器状态的,https://github.com/ithewei/libhv/blob/4f05ec33106df4f6af14b474b61543156af25db9/http/client/AsyncHttpClient.cpp#L115 你可以加点日志看看

是不是设置了HttpService::limit_rate=0导致?如果设置为0,会禁止下载大文件(默认超过4M就是大文件)

退出线程时应该等待IO线程结束,return 0前,加 ``` loopThread.stop(); loopThread.join(); ``` 试试

最新master分支上有个修复,看看带上没https://github.com/ithewei/libhv/commit/41c63bfbf0e4817711febfbe695609d524d4af85