coost icon indicating copy to clipboard operation
coost copied to clipboard

A tiny boost library in C++11.

Results 58 coost issues
Sort by recently updated
recently updated
newest added

https://github.com/idealvin/coost/issues/242#issue-1310333772

在生产环境中,我实现了一个高可用机制。在节点失效后,客户端自动重连其他节点。同时有其他守护进程会巡检节点,如果节点恢复之后就把其加入回可用节点列表。 问题的情况是,最开始有两个服务器,节点1失效切换到节点2是没问题的。但是在第一次切换之后,节点2切换回节点1(强制杀死节点2)的过程中。客户端与节点1重新建立连接,co::connect返回false, 但是co::error()返回0。具体平台是windows 10。

MFC调用的GUI程序,测试开启后执行close再开一次就会闪退。

improvement

The API in JSON module described in the docs are not compatible in the latest release version(2.0.3). I hope there could be a new release version and upload to conan....

![50ba2e01a425f2bc8c3901cd1beadbe](https://user-images.githubusercontent.com/33535734/179886587-a2bb23ed-740f-44e0-970d-f7fc8adf1180.png) ![12d284ca22e47b51d2c89a551aee132](https://user-images.githubusercontent.com/33535734/179886620-9ae7dcd3-1fae-41d6-91dd-e43c46eb12ca.png)

添加对http long-connection session模式的支持。即一直保持http连接,并且response不断追加发送数据的工作模式。 此模式常用于需要保持连接完成大量数据发送(如发送超长文件)或者数据不定时发送(如:视频实时推流,x-mixed-replace,部分web-socket应用场景等)。 主要改动(API接口部分): 1、在Http Response类(Res)中,新增一个send_body方法。此方法可在设置完header(add_header)后使用。用户每次调用send_body将即时发送一批body数据(因此,第一次调用send_body会附加Http response header的发送)。用户可以在保证当前协程函数(on_req)不退出的情况下任意多次调用send_body,直至业务数据发送完毕或者出错(send_body返回非0)。无论出错还是正常完成,退出当前协程函数即完成本http session资源的清理。 2、因为send_body(长连接)模式与set_body(短链接)模式互斥,因此修改set_body函数返回值为bool。用户调用set_body以后将无法调用send_body,同理用户调用send_body以后也将无法调用set_body(返回false)。 实现部分改动: 在Response-ctx类实现中,增加3个成员: - tcp::Connection pc_; //存放本http Session socket connection的指针。短连接时用不到,仅在长连接模式下使用 - header_send; //header是否发送的状态码。初始化为0,表示header未处理。为-1表示header已经pack但未发送(短链接模式),为1表示header已经发送(长连接模式)。 - s_err:仅用于长连接模式,表示是否有socket_error。

error message ` Could not find a package configuration file provided by "cocoyaxi" with any 1> [CMake] of the following names: 1> [CMake] 1> [CMake] cocoyaxiConfig.cmake 1> [CMake] cocoyaxi-config.cmake 1>...

help wanted
conan / vcpkg