libhv
libhv copied to clipboard
🔥 比libevent/libuv/asio更易用的网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket/MQTT client/server.
accept连接频繁的时候这个惊群现象性能影响挺明显的,有什么好的改善方案吗?
满足一些需要对HttpServer通讯层socket套接字hio做一些业务处理操作或计数器类需求。
windows: ``` PS E:\Codes\cpp\libhvN\build\bin\Debug> ./ping 2400:3200::1 64 bytes from 2400:3200::1: icmp_seq=1 time=43.1 ms 64 bytes from 2400:3200::1: icmp_seq=2 time=43.1 ms 64 bytes from 2400:3200::1: icmp_seq=3 time=43.0 ms 64 bytes from...
 
mqtt和tcp网络重连时都会调用hio_create_socket创建Io,但是当网络异常或者网卡还未准备好时又或是网络本来是正常的突然没网情况时,hio_create_socket函数由于无法进行域名解析导致hio_create_socket直接返回为NULL,而重连定时器运行的前提是socket要正常创建,进而导致重连无法实现。现在要解决问题就很麻烦,希望libhv能解决这个问题就好了,这样就无脑使用就行。    
`hconfig.h`是自动生成的文件,并且已配置为忽略,应当删除原始文件,使配置生效。 https://github.com/ithewei/libhv/blob/fded2ba287199d3c20c619e06ddc571e2972ed92/.gitignore#L65 因为这个文件构建时会自动生成,让 git submodule 产生意外变更,造成一些不便。
add homebrew formula now ``` brew install cxwx/cxbrew/libhv ``` but it need the `test` part for merge to homebrew-core like ``` test do (testpath/"test.c").write
``` http_client_send_async(req, [=](const HttpResponsePtr &resp) { if (resp != nullptr) { resp->body; //body="" resp->status_code; // status_code=200 } else { } } ``` 有没有人遇到这种情况,发生这种情况时服务端并未收到这条请求,但是libhv确实返回了200以及空body
Please provide a link to a websocket client example that includes server authentication, and if there's another example that show how to do client authentication too. Thanks
复现方法: 运行hv样例中的httpd, 然后使用Chrome浏览器访问https://127.0.0.1:8443/downloads/libhv-vs-nginx.png, f12调试工具报错"net::ERR_HTTP2_FRAME_SIZE_ERROR". hv版本: v1.3.3 CMake参数: -DWITH_OPENSSL=ON -DWITH_NGHTTP2=ON 系统: Ubuntu 24.04