mirror of
https://github.com/skywind3000/kcp.git
synced 2025-04-28 07:50:14 +08:00
Updated EN_KCP Basic Usage (markdown)
parent
0369e238e5
commit
943ef81a96
@ -1,8 +1,8 @@
|
||||
# Usage
|
||||
|
||||
The basic usage steps for application which integrate with KCP:
|
||||
The basic usage for application to integrate with KCP:
|
||||
|
||||
1. Create a KCP object handler:
|
||||
1. Create a KCP object:
|
||||
|
||||
```cpp
|
||||
// Allocate a KCP object and initialize it.
|
||||
@ -26,7 +26,7 @@ The basic usage steps for application which integrate with KCP:
|
||||
ikcp_setoutput(kcp, udp_output);
|
||||
```
|
||||
|
||||
3. Update the status of KCP:
|
||||
3. Update the states of KCP:
|
||||
|
||||
```cpp
|
||||
// Every some time, such as 10ms, call this method to update the status of KCP.
|
||||
@ -35,7 +35,7 @@ The basic usage steps for application which integrate with KCP:
|
||||
ikcp_update(kcp, current);
|
||||
```
|
||||
|
||||
4. Notify KCP when received a packet from peer:
|
||||
4. Notify KCP when data received from peer:
|
||||
|
||||
```cpp
|
||||
// For examle, when got a UDP packet, notify KCP.
|
||||
@ -53,7 +53,7 @@ The basic usage steps for application which integrate with KCP:
|
||||
# Config KCP
|
||||
|
||||
The default mode of KCP is a standard ARQ,
|
||||
user can setup the bellow options for high efficient transport:
|
||||
user can setup the bellow options to accelerate:
|
||||
|
||||
1. Work mode
|
||||
```cpp
|
||||
|
Loading…
Reference in New Issue
Block a user