Comments (4)
你做个测试就明白了。约定时间长度内,如果Server没收到任何一条Tcp消息,就会断开并删除该连接。需要间隔发心跳协议,避免自己被断开删除。
from uv-cpp.
我用 echo_server.exe 和 clients.exe做测试,把 TimerWheel中的 timeoutSec_ 成员指定为5,在同一机器上把服务和客户端都启动,但是,过了5秒后,客户端好像都没有自动断开哦,这是什么情况?如果客户端断开了,服务端会检测到断开,并输出一条日志,但是过了5秒并没有输出日志
from uv-cpp.
不是客户端断开,是服务端主动断开连接。前提是这五秒没有消息通信,你记得注释掉clients代码里面发送消息部分。我测试下是会断开的,服务端不会打日志,但是客户端在5s后会打一个连接被断开的日志。
from uv-cpp.
谢谢,知道了,现在正在学习您封装的libuv库uv-cpp
from uv-cpp.
Related Issues (20)
- TcpConnection::write函数中似乎有隐藏的内存泄露问题? HOT 3
- TcpServer在客户端断开后发送数据崩溃 HOT 3
- uv::Packet::readFromBuffer 的解包问题? HOT 3
- new EventLoop,再delete,VS报告内存泄露 HOT 1
- 下一个版本解决问题。 HOT 21
- packet中size为uint16_t存放数据长度是否太小? HOT 2
- 新版的代码中有未定义的 ssize_t
- 编译出错 HOT 2
- TimerWheel 类的是否会将没有超时连接删除 HOT 8
- 请问是否支持ssl? HOT 1
- 关于内存的释放问题 HOT 5
- httpserver长链接
- uv-cpp做客户端时,当服务端连不上,重复去连接时,无论是linux还是Windows都会奔溃 HOT 14
- libuv升级到新版本支持吗 HOT 1
- client跨线程循环发送时候 ,client崩溃 HOT 4
- linux centos7下,偶现程序运行一段时间后,CPU使用率100%的情况。最后奔溃。 HOT 1
- centos 7 运行一晚第二天看到崩溃了 HOT 2
- 请教下 这个可以支持百万或者千万并发吗? HOT 3
- 你好,cmake和make之后该怎么运行helloworld例子 HOT 3
- async 有对应的例子吗?
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 uv-cpp.