Comments (23)
write接受参数是字节buffer: yasio::sbyte_buffer, fast_obstream通过API buffer()拿到sbyte_buffer
from yasio.
在lua中不管是yasio.obstream还是 yasio.fast_obstream new出来的都没有buff()方法,只有to_string()方法 测试可以发送出去 ,但是截包发现yasio.fast_obstream 还是大端模式,有什么别的接口可以强制小端么?
from yasio.
在lua中不管是yasio.obstream还是 yasio.fast_obstream new出来的都没有buff()方法,只有to_string()方法 测试可以发送出去 ,但是截包发现yasio.fast_obstream 还是大端模式,有什么别的接口可以强制小端么?
to_string按理说可以
from yasio.
你的编译环境是啥,c++14以上吗?
from yasio.
fast 和非fast写入几个数值数据,to_string对比是一样的?
from yasio.
我错了 fast_obstream:to_string() 是ok的,昨天截图看错了位置,服务器有回包,然后自带的粘包处理应该也是大小端问题 导致没有走YEK_PACKET回调, 粘包的能设置大小端么。。
from yasio.
对,内置拆包是大端
from yasio.
我看下加个配置
from yasio.
我这里收到的前两个字节是22,00也就是34 总长度是36 我的包头不包含长度 所以设置的参数是self.client:set_option(yasio.YOPT_C_LFBFD_PARAMS,
0, -- channelIndex, 信道索引
65535, -- maxFrameLength, 最大包长度
0, -- lenghtFieldOffset, 长度字段偏移,相对于包起始字节
2, -- lengthFieldLength, 长度字段大小,支持1字节,2字节,3字节,4字节
2 -- lengthAdjustment:如果长度字段字节大小包含包头,则为0, 否则,这里=包头大小
)
为啥木有回调呀?
from yasio.
就是大小端问题,你的截图数据是小端
from yasio.
好的 求大佬加个配置接口
from yasio.
一会儿加
from yasio.
已添加选项
from yasio.
加了参数 收到YEK_PACKET ok了 但是local ibs = event:packet()返回的Ibs默认应该也是大端,,,这个有啥办法么?看到有个fast_ibstream 但是不清楚怎么转换
from yasio.
lua绑定哪里估计需要再加个参数才行
from yasio.
或者统一成flag: default(0), no_swap(1), (2)raw
from yasio.
你回复的3个flag我在源码里面搜没搜索到 - -
from yasio.
还没加,不过sol2,lua绑定貌似不行,返回值类型不同,无法编译,所以估计得加接口才行,比如: event:fast_packet()
from yasio.
好 坐等大佬加接口!!
from yasio.
sol2的绑定加好了,可以用标记为,无需新增接口: ab5ef3c
from yasio.
好 坐等大佬加接口!!
又提交了下,更新下,应该ok了
from yasio.
目前在mac上测试通过啦 后续会打包在手机上试试。感谢大佬!
from yasio.
ok
from yasio.
Related Issues (20)
- Refactor ssl handshake, SSL server support
- The singal_blocker introduced sicne 3.39.6 will cause random block when app startup on android platform
- YOPT_C_UNPACK_STRIP 没有导出到lua
- v4.0.0
- About the new redesigned I/O Multiplexing backend
- ipv6 编译开关选项 HOT 2
- How to use with CPM? HOT 27
- How to use websocket with this library? HOT 2
- Support for WebAssembly HOT 1
- Build for watchOS HOT 1
- Error when compile for watchOS HOT 10
- Error when try compile for Android
- Update to latest mbedtls version HOT 2
- 考虑将github workflow的编译结果 放到release中吗 HOT 2
- The dedicated yasio::string concept
- object_pool address align issues solved since 3.39.10/4.0.0
- The implementation of concurrent object pool is not thread-safe
- response data parse
- The max wait_duration shouldn't greater than kcp interval
- socket.bind raise error EPERM on macOS runs on code signed sandbox mode
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 yasio.