TypeScript port of the KCP protocol modified to support Genshin Impact.
Genshin Impact KCP adds an unsigned 32-bit integer field between conv
and cmd
in the
packet headers which makes it incompatible with the original KCP protocol.
This implementation adds built-in support for that field.
This fork allows user to "fake" the 0ms ping indicator by tampering with the timestamp field before sending
API should be mostly self-explanatory if you are familiar with KCP already. The entire implementation is contained within a single file kcp.ts.
kcp-ts is licensed under the MIT License.