# KumoKyaku/kcp

KCP C#版。线程安全，运行时无alloc，对gc无压力。

Repository: https://github.com/KumoKyaku/kcp
Canonical: https://ross.abutalabs.com/products/kumokyaku-kcp
Language: C#
License: MIT
License Family: permissive
Topics: kcp, unity, csharp-library, nuget, no-allocation, dotnet-standard, il2cpp
Last push: 2023-11-16T02:20:29+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2772, "days_push": 1022, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1005, forks 155 (observed 2026-09-03T02:15:06.433015+00:00)

## What it is
A C# port of the KCP reliable UDP protocol, offering a thread-safe, allocation-free implementation suitable for game networking. It supports async APIs, custom segment types, Span<byte>, and unmanaged memory to avoid GC pressure.

## Use cases
- implement reliable UDP transport in a Unity game
- reduce GC pressure in a C# network protocol implementation
- port KCP-based networking to .NET Standard
- use KCP with IL2CPP in Unity
- send messages safely from multiple async threads
- customize memory management for a network protocol

## When to choose
- you need KCP in a C#/.NET or Unity project
- you need a zero-allocation, GC-friendly reliable UDP implementation
- you want async ValueTask-based I/O APIs
- you need thread-safe Send/Input from multiple threads

## When to avoid
- you need the original C implementation or C bindings
- you need multi-threaded Recv/Update calls
- you rely on KCP stream mode filling the last unsent packet
- your project is not on .NET/Unity

## Facets
- artifact type: library
- maturity: active
- function: networking, concurrency
- domain: networking, developer-tools
- platform: dotnet, cross-platform, cpp
- tags: kcp, reliable-udp, unity, no-allocation, il2cpp, game-networking, transport-protocol, game-development

## Member repositories
- KumoKyaku/kcp (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:06.433015+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:13:05.766287+00:00, confidence not recorded.
  - readme: https://github.com/KumoKyaku/kcp (fetched 2026-09-03T02:15:06.433015+00:00, sha 49deec1a2cfb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
