Home

Awesome

asio_kcp - a fast and reliable udp framework.

This framework will be the fastest protocal for pvp game.

kcp - a A Fast and Reliable ARQ Protocol (Can use with UDP)

website of kcp: https://github.com/skywind3000/kcp
This project wrap kcp by boost asio. Making it easy to use.

Feature

Bench mark

worst network lag happen:
asio: 10:51.21
291  295   269   268   231   195   249   230   225   204

enet: 10:51.21
1563   1520    1470    1482    1438    1454    1412    1637    1588    1540
You can see the bench mark test result at here
Or you can see the bench mark detail log at bench_mark folder.

client_lib

Feature:

Recommend: use Dockerfile to compiling the server and client.

<br> ### Or create compiling env yourself<br> * I using gcc 4.8 * Other version of gcc that support c++11 should be OK. You can compile asio_kcp as verifying.

The third_party folder should like below,

▾ third_party/
  ▾ g2log/
    ▸ build/
    ▸ src/
    ▸ test_example/
    ▸ test_performance/
    ▸ test_unit/
      CMakeLists.txt
  ▸ muduo/

Compile unit test

The third_party folder should like below,

▾ third_party/
  ▸ g2log/
  ▸ gmock-1.7.0/
  ▸ gtest-1.7.0/
  ▸ muduo/

Run example test

filter the verbose log from asio timer
./server/server 0.0.0.0 12345 2>&1 | grep --line-buffered -v -e deadline_timer -e "ec=system:0$" -e "|$" >>bserver.txt
filter all asio log
./client_with_asio/client_with_asio 23425 127.0.0.1 12345 500 2>/dev/null

run bench mark test of kcp.

git checkout kcp_bench_mark_test
read the readme.md in this branch. and do compiling thing.
then run server on your server:
  ./server/server 0.0.0.0 12345 2>&1 | grep --line-buffered -v -e deadline_timer -e "ec=system:0$" -e "|$" >>bserver.txt
git checkout kcp_bench_mark_test
read the readme.md in this branch. and do compiling thing.
./client_with_asio/client_with_asio 23445 120.26.200.117 12345 500 2>/dev/null
# Note: changing the ip and port to your server which is running the asio_kcp_server

how to test 3G/4G

Centos 6.5 install help:

boost http://www.boost.org/doc/libs/1_58_0/more/getting_started/unix-variants.html

error when running server<br>

/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found

OSX install help

gcc 4.8

https://apple.stackexchange.com/questions/118830/install-gcc-to-mac-via-terminal
http://www.tuicool.com/articles/reqiY3

boost 1.58