Comments (5)
不定长也可以用PULL,只要包头能拿到包体的长度
from hp-socket.
可能你使用pull的方式有问题,正常情况下只要你的应用层协议定义得合理(包头包体清晰)是不需要调用HP_TcpPullServer_Peek方法的。可参考相关示例DEMO。
from hp-socket.
谢谢回答。我遇到的是别人定的不定长协议。。
from hp-socket.
大哥,就是因为包头也不定长,不然我也不会提这个了。。
from hp-socket.
如果不同包类型的包头长度固定或包头的最前字节为包类型和包头长度还好处理,可以对包头进行二次解析。否则只能自己处理了,或者直接用PUSH模型。
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
- UDP服务端运行一会后奔溃 客户端以非常快速度发送数据 HOT 9
- 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 1
- 请问有没有类似sendmmsg和recvmmsg的支持,或者其他加速小包(payloa在32~64 Bytes)发送的功能呢 HOT 1
- 建议增加设置/获取 组件标识符功能, 为多个组件共用一个监听器提供便利 HOT 2
- 可以做个vcpkg的包吗? HOT 1
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.