Comments (9)
from hp-socket.
- 什么平台
- 内存是否耗尽了
- 提供测试样例代码
from hp-socket.
1、
Linux lubancat 4.19.232 #7 SMP Mon Jul 10 16:21:10 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
Ubuntu 22.04.2 LTS
2、内存没有耗尽,也没有泄露,cpu也没有用满
代码就是UDP 服务端的代码
class WZSensorUdpServerListener : public CUdpServerListener
{
private:
/* 保护工具类*/
WZProtectHelper *m_protect_base;
public:
void setWZProtectBase(WZProtectHelper *wz_protect_base)
{
this->m_protect_base = wz_protect_base;
}
virtual EnHandleResult OnPrepareListen(IUdpServer *pSender, SOCKET soListen) override
{
return this->m_protect_base->OnPrepareListen(pSender, soListen);
}
virtual EnHandleResult OnAccept(IUdpServer *pSender, CONNID dwConnID, UINT_PTR soClient) override
{
return this->m_protect_base->OnAccept(pSender, dwConnID, soClient);
}
virtual EnHandleResult OnHandShake(IUdpServer *pSender, CONNID dwConnID) override
{
return this->m_protect_base->OnHandShake(pSender, dwConnID);
}
virtual EnHandleResult OnReceive(IUdpServer *pSender, CONNID dwConnID, const BYTE *pData, int iLength) override
{
return this->m_protect_base->OnReceive(pSender, dwConnID, pData, iLength);
}
virtual EnHandleResult OnSend(IUdpServer *pSender, CONNID dwConnID, const BYTE *pData, int iLength) override
{
return this->m_protect_base->OnSend(pSender, dwConnID, pData, iLength);
}
virtual EnHandleResult OnClose(IUdpServer *pSender, CONNID dwConnID, EnSocketOperation enOperation, int iErrorCode) override
{
// 重新连接
return this->m_protect_base->OnClose(pSender, dwConnID, enOperation, iErrorCode);
}
virtual EnHandleResult OnShutdown(IUdpServer *pSender) override
{
return this->m_protect_base->OnShutdown(pSender);
}
};
WZSensorUdpServerListener wz_sensor_udp_server_listener;
CUdpServerPtr sensor_recv_server(&wz_sensor_udp_server_listener);
if (!sensor_recv_server->Start("0.0.0.0", 1600))
{
printf("start error\n");
return -1;
}
即使WZProtectHelper 的方法直接return 也会崩溃,客户端为其他平台,发送频率1秒10K数据,uint8数组,长度为42
from hp-socket.
你这个是ARM平台吗?
先编译个debug版本,异常时生成core dump,通过dump文件看看异常位置。
from hp-socket.
这种可以吗 另往你gmail发了我的微信号 方便微信沟通处理下吗
from hp-socket.
加入QQ群吧~
from hp-socket.
堆栈信息,代码行号都看不到。
from hp-socket.
试试 dev分支的6.0.1版本,对UDP Server组件作了大量优化。
from hp-socket.
试试6.0.1版本。
from hp-socket.
Related Issues (20)
- 在DLL中使用HP-Socket时退出DLL时卡死 HOT 3
- Invalid request code 然后程序崩溃 HOT 2
- ubuntu 22.04 HOT 2
- 无法启动服务器。( The listener will not start.) HOT 12
- 求官方支持macos和ios HOT 2
- 建议封装一个websocket类 HOT 2
- mint
- 能否加入zstd压缩库 HOT 3
- 向全体发送消息时 调用Send有的时候发不出去 必须稍微延迟一会 HOT 2
- 6.0.1没发布?看日志记录有6.0.1 HOT 2
- 流式数据压缩 怎么用呀 HOT 4
- 作者是那个国家的? HOT 1
- 可以支持vcpkg? HOT 1
- 解压算法出错,解压数据不能正确处理 HOT 4
- HP_Create_BrotliCompressor 函数请求支持lambda表达式绑定 HOT 1
- 断线重连机制卡死 HOT 2
- 请问有没有类似sendmmsg和recvmmsg的支持,或者其他加速小包(payloa在32~64 Bytes)发送的功能呢 HOT 1
- 建议增加设置/获取 组件标识符功能, 为多个组件共用一个监听器提供便利 HOT 2
- 可以做个vcpkg的包吗? 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 hp-socket.