Skip to content
winlin edited this page Feb 15, 2017 · 19 revisions

Introduction

KCP is a fast reliable transport protocol, which use FEC/ARQ(about 10%-20% bandwidth cost) to decrease the latency(about 30%-40% off), and in the best situation the latency is 1/3 of TCP. As KCP only defined the application-level APIs, the under-layer transport of KCP is not limited, user can choose any protocol preferred; that is, user must integrate KCP to the specific system, to define or choose the under-layer protocol, for instance, UDP or private protocol over UDP, feed data to KCP by callback, and setup the time-clock of KCP. There is no syscalls in KCP, it's well defined library for almost all popular transport server or applications.

There are only two source files, the ikcp.h and ikcp.c, so it's very easy to use KCP by copying it to your project and adapter to your protocol stack. For example, whatever your application is a P2P system, or protocol over UDP(such as RTP, RTMFP, Webrtc, RTMP or HTTP-FLV, haha), a few lines(maybe < 10) of codes can integrate KCP to your system, to use the ARQ or FEC advantage.

Content

Clone this wiki locally