# skywind3000/kcp

:zap: KCP - A Fast and Reliable ARQ Protocol

Repository: https://github.com/skywind3000/kcp
Canonical: https://ross.abutalabs.com/products/kcp
Language: C
License: MIT
License Family: permissive
Topics: kcp, udp, arq, quic, protocol, srt, rtc, low-latency, c, ack, accelerator, tunnel, kcptun, rtt, socket
Last push: 2026-06-23T06:21:10+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 89, release rhythm 84, longevity 100
- inputs: {"age_days": 4268, "days_push": 71, "days_rel": 110, "gap_med": 6.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 16887, forks 2626 (observed 2026-08-28T04:11:17.390632+00:00)

## What it is
KCP is a fast and reliable ARQ (Automatic Repeat reQuest) protocol implemented as a pure algorithm in C, consisting of just two source files (ikcp.h and ikcp.c). It trades 10%-20% extra bandwidth for 30%-40% lower average latency compared to TCP, and requires the user to supply the underlying packet transport (e.g., UDP) via callbacks.

## Use cases
- reduce latency for real-time game networking over UDP
- add reliable delivery on top of a custom UDP protocol
- build a low-latency tunnel or proxy transport
- implement P2P communication with reliable ordering
- speed up data transfer on lossy high-latency networks
- embed a reliable ARQ layer into an existing protocol stack

## When to choose
- you need TCP-like reliability with much lower latency than TCP
- you want a tiny, dependency-free C library you can drop into any project
- you already have a UDP transport layer and just need reliability on top
- you are building games, RTC, or tunnels where per-packet latency matters more than bandwidth

## When to avoid
- you need maximum bandwidth throughput rather than minimal latency
- you want a complete out-of-the-box transport with sockets handled for you
- you cannot tolerate any bandwidth overhead (10%-20%)
- you need a high-level networking API rather than a low-level protocol algorithm

## Facets
- artifact type: library
- maturity: stable
- function: networking, concurrency
- domain: networking, microservices, gaming-tools
- platform: cpp, c, cross-platform
- tags: udp, arq, low-latency, reliable-transport, protocol-implementation, game-networking, tunnel, real-time

## Member repositories
- skywind3000/kcp (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:17.390632+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-29T17:03:42.410492+00:00, confidence not recorded.
  - readme: https://github.com/skywind3000/kcp (fetched 2026-08-28T04:11:17.390632+00:00, sha 46bb897fcdfc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
