{"id":15014329,"url":"https://github.com/l42111996/java-kcp","last_synced_at":"2025-04-13T00:43:36.134Z","repository":{"id":41284331,"uuid":"150381681","full_name":"l42111996/java-Kcp","owner":"l42111996","description":"基于java的netty实现的可靠udp网络库(kcp算法)，包含fec实现，可用于游戏，视频，加速等业务","archived":false,"fork":false,"pushed_at":"2024-05-07T11:59:13.000Z","size":463,"stargazers_count":495,"open_issues_count":5,"forks_count":145,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-13T00:43:31.450Z","etag":null,"topics":["arq","fec","java","kcp","moba","netty","reedsolomon","reliable-udp","udp"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/l42111996.png","metadata":{"files":{"readme":"README.en.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-26T06:53:57.000Z","updated_at":"2025-04-12T08:42:02.000Z","dependencies_parsed_at":"2024-01-13T23:17:58.268Z","dependency_job_id":"1e9c5e48-e212-43b7-9bde-a073e224630d","html_url":"https://github.com/l42111996/java-Kcp","commit_stats":{"total_commits":166,"total_committers":4,"mean_commits":41.5,"dds":0.09638554216867468,"last_synced_commit":"efcd44a03592cb2bf3ff27d67cdd15e2e6e421dc"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l42111996%2Fjava-Kcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l42111996%2Fjava-Kcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l42111996%2Fjava-Kcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l42111996%2Fjava-Kcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l42111996","download_url":"https://codeload.github.com/l42111996/java-Kcp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650418,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arq","fec","java","kcp","moba","netty","reedsolomon","reliable-udp","udp"],"created_at":"2024-09-24T19:45:28.786Z","updated_at":"2025-04-13T00:43:36.112Z","avatar_url":"https://github.com/l42111996.png","language":"Java","readme":"# java-Kcp\n\n[![Powered][2]][1]\n\n[1]: https://github.com/skywind3000/kcp\n[2]: http://skywind3000.github.io/word/images/kcp.svg\n\nKcp based on netty version (including implementation of fec function)\n\nKCP is a udp-based fast and reliable protocol (rudp), which can reduce the average delay by 30% -40% at the cost of wasting 10% -20% of bandwidth over TCP, and reduce the maximum delay by three times the transmission effect.\n\n# maven repository:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.l42111996\u003c/groupId\u003e\n  \u003cartifactId\u003ekcp-base\u003c/artifactId\u003e\n  \u003cversion\u003e1.6\u003c/version\u003e\n\u003c/dependency\u003e\n```\n# Using method and parameters\n1. [Server-side example](https://github.com/l42111996/java-Kcp/blob/master/kcp-example/src/main/java/test/KcpRttExampleServer.java)\n2. [Client Example](https://github.com/l42111996/java-Kcp/blob/master/kcp-example/src/main/java/test/KcpRttExampleClient.java)\n3. [Best Practices](https://github.com/skywind3000/kcp/wiki/KCP-Best-Practice)\n4. [A lot of information](https://github.com/skywind3000/kcp)\n5. Compatible with C #, [java server](https://github.com/l42111996/java-Kcp/blob/master/kcp-example/src/main/java/test/Kcp4sharpExampleServer.java), [c #Client](https://github.com/l42111996/csharp-kcp/blob/master/example-Kcp/KcpRttExampleClient.cs)\n6. [Encountered problems](https://github.com/l42111996/java-Kcp/blob/master/QA.md)\n7. [Performance test results](https://github.com/l42111996/java-Kcp/blob/master/Benchmark.md)\n8. [Compatible with kcp-go, including fec compatible](https://github.com/l42111996/java-Kcp/blob/master/kcp-example/src/main/java/test/Kcp4GoExampleClient.java)\n\n# compatibility:\n1. Compatible with c version of kcp\n2. fec implementation based on https://github.com/Backblaze/JavaReedSolomon\n3. Perfectly compatible C# version, https://github.com/l42111996/csharp-kcp, quickly build the network library before the game\n\n# optimization:\n1. Based on event-driven, make full use of multi-core\n2. Optimize fastack logic and reduce traffic by 10%\n3. Optimize the check function.\n4. Optimize collection iterators.\n5. Include fec to reduce latency\n6. With crc32 check\n7. Use the time wheel to optimize the CPU usage of a large number of connections\n8. Use directbuf and object pool, no gc pressure\n9. Increase the use of conv or ip + port to determine the uniqueness of the channel. The game is recommended to use conv and tcp configuration. [Related information](https://github.com/skywind3000/kcp/wiki/Cooperate-With-Tcp-Server)\n10. Changes in export ip such as 4G switching wifi when adding games will not cause disconnection\n\n\n# Relevant information\n1. https://github.com/skywind3000/kcp The original ccp version of kcp\n2. https://github.com/xtaci/kcp-go go version kcp, with a lot of optimization\n3. https://github.com/Backblaze/JavaReedSolomon java version fec\n4. https://github.com/LMAX-Exchange/disruptor High-performance inter-thread messaging library\n5. https://github.com/JCTools/JCTools efficient concurrent library\n6. https://github.com/szhnet/kcp-netty A kcp for java version\n7. https://github.com/l42111996/csharp-kcp C# version of kcp based on dotNetty, perfectly compatible\n\n# communicate with\nQQ: 526167774","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl42111996%2Fjava-kcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl42111996%2Fjava-kcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl42111996%2Fjava-kcp/lists"}