Comments (14)
定时器是指超时检测吗?
from cinatra.
ping pong 是有实现的,不知道你说的没有实现ping pong是怎么测试的。
from cinatra.
定时器是指超时检测吗?
定时器可以让用户实现是类似订阅功能,服务端主动一次性向所有客户端下发消息
from cinatra.
ping pong 是有实现的,不知道你说的没有实现ping pong是怎么测试的。
我看了源码似乎仅实现了
cinatra/include/cinatra/connection.hpp
Line 1483 in 2e4288f
inline constexpr data_proc_state ws_open = data_proc_state::data_begin;
inline constexpr data_proc_state ws_message = data_proc_state::data_continue;
inline constexpr data_proc_state ws_close = data_proc_state::data_close;
inline constexpr data_proc_state ws_error = data_proc_state::data_error;
应该还有on_ping
/on_pong
/on_timer
, 又或许这个库设计和我看的其他库不一样我没找到吗
from cinatra.
on_ping/on_pong 没有开放给用户,server 内部处理了,看有没有必要开放出来给用户。
on_timer 不属于websocket 协议,属于应用层的东西,不过可以讨论一下具体场景和用法。
from cinatra.
ping pong 是有实现的,不知道你说的没有实现ping pong是怎么测试的。
我看了源码似乎仅实现了
cinatra/include/cinatra/connection.hpp
Line 1483 in 2e4288f
inline constexpr data_proc_state ws_open = data_proc_state::data_begin; inline constexpr data_proc_state ws_message = data_proc_state::data_continue; inline constexpr data_proc_state ws_close = data_proc_state::data_close; inline constexpr data_proc_state ws_error = data_proc_state::data_error;应该还有
on_ping
/on_pong
/on_timer
, 又或许这个库设计和我看的其他库不一样我没找到吗
你看的其它库是什么库?
from cinatra.
ping pong 是有实现的,不知道你说的没有实现ping pong是怎么测试的。
我看了源码似乎仅实现了
cinatra/include/cinatra/connection.hpp
Line 1483 in 2e4288f
inline constexpr data_proc_state ws_open = data_proc_state::data_begin; inline constexpr data_proc_state ws_message = data_proc_state::data_continue; inline constexpr data_proc_state ws_close = data_proc_state::data_close; inline constexpr data_proc_state ws_error = data_proc_state::data_error;应该还有
on_ping
/on_pong
/on_timer
, 又或许这个库设计和我看的其他库不一样我没找到吗你看的其它库是什么库?
from cinatra.
我使用websocket客户端时,我让服务端退出客户端不会触发on_close
回调,使用的是readme示例中的客户端代码,仅在后面加上了
while true{
sleep(10s)
}
以便测试, 这是预期的吗
from cinatra.
不符合预期,应该要触发on_close, @helintongh 你有时间先看一下这个问题吧。
from cinatra.
收到,周末改
from cinatra.
在这个 pr 已经修复该bug。
server目前调用stop函数会向连接了的websocket客户端发送close命令。
from cinatra.
websocket服务端还有另外一个问题,即是接受到客户端的ping后没有重置定时器导致客户端断联。pr426 已经修复该bug。
from cinatra.
websocket服务端还有另外一个问题,即是接受到客户端的ping后没有重置定时器导致客户端断联。pr426 已经修复该bug。
太好了,就是此BUG让我找到了这里来
from cinatra.
用最新的server验证即可。
from cinatra.
Related Issues (20)
- http响应数据解析有情况 HOT 19
- refactor cinatra server to support c++20 coroutine HOT 4
- 编译报错,‘_M_set_length’ is not a member of ‘std::string’ HOT 5
- 如何使用已有的io_context运行cinatra HOT 1
- 如何获取coro_http_client调接口 耗时 HOT 3
- Highly concurrent downloading of 2m js files will increase memory usage HOT 1
- websocket,1分钟没有消息交互,服务端会主动把链接掐断 HOT 2
- Windows visit Chinese filename not found
- 请问下,考虑支持unix套接字吗. HOT 10
- 是否可以让server对象的listen函数支持设置连接队列的长度? HOT 6
- bug: gcc resize_and_overwrite 導致髒數據的問題 HOT 21
- fatal error: 'asio/dispatch.hpp' file not found HOT 2
- https question HOT 18
- Failed to connect websocket with `Connection: upgrade` HOT 3
- [需求] 处理程序相关 HOT 12
- client URL 检测 的奇怪 bug HOT 7
- 上传二进制文件无法使用 HOT 2
- async_download 没有写入内容到文件 HOT 5
- 请问下,当链接断开时,如何获取到具体原因? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cinatra.