hkspirt / kcp-java Goto Github PK
View Code? Open in Web Editor NEW基于skywind3000/kcp的Java版本
基于skywind3000/kcp的Java版本
我试了下安卓,Output回调时在send线程中用回调的bytes去构建一个DatagramPacket,然后往服务端发送,服务端收不到。但是安卓这边也没报错。。。 不知道是啥原因了,使用原始的UDP去发送就一切正常。大哥能帮忙看看不
C++ KCP implementation used little-endian while encoding but this version used big-endian encoding when serializing packets.
I know it's not an issue but it's good to post it somewhere so everyone will know.
thx! ;)
Sincerely,
Tobias.
目前实现太C风格了。
手滑没写完就发上去了,不好意思……
今天试图使用dalao的 kcp-java 与 官方的 skywind3000/kcp 进行通信,但失败了,在 C 版本中进行追踪,发现是conv不符合,被丢弃了。
然后抓包,发现使用 conv = 1428 时,Java 实现的 kcp 的 UDP 包头 4 个字节是 0x00 0x00 0x05 0x94,C 实现那边解码出来就变成了 2483355648 这样的奇怪的数据。
然后使用 C 实现的 KCP 发送并抓包,发现头4个字节是 0x94 0x05 0x00 0x00。
与 go和其他版本的兼容性怎么样?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.