YASIO - Yet another Asynchronous Socket I/O.
yasio is a multi-platform support and lightweight library with focus on asynchronous socket I/O for any client application, support windows & linux & apple & android & win10-universal.
- RAOL Mobile Game Project: Since the game is published on Tencent Games at 2018.10.17, it’s run at millions of devices.
- x-studio IDE Project: The local LAN upgrade system is based on yasio.
- xlua: Integrate yasio to xlua, make the unity3d game project based on xlua can use yasio lua bindings APIs.
- Unreal Engine 4: Integrate yasio to unreal engine 4, make the ue4 game project yasio, lua will complete in the future, may based on Tencent’s UnLua.
Simple run tcptest with g++
g++ tests/tcp/main.cpp --std=c++11 -DYASIO_HEADER_ONLY -lpthread -I./ -o tcptest && ./tcptest
Build more examples with cmake
git clone https://github.com/yasio/yasio cd yasio git submodule update --init --recursive # For macOS xcode, it's shoud be: cmake -B build -GXcode cmake -B build # Use cmake command to build examples & tests, or use platform specific IDE to open yasio project # a. Windows: Use Visual Studio(2013~2019 supported) to open build/yasio.sln # b. macOS: Use Xcode to open build/yasio.xcodeproj cmake --build build --config Debug
- Support TCP/UDP/KCP, and manipulate APIs are same
- Support process
sticking packetsfor TCP internal, user do not need to care it
- Support multicast
- Support IPv4/IPv6 network
- Support multi-connections at one thread
- Support high-resolution deadline timer
- Support lua bindings
- Support cocos2d-x jsb
- Support CocosCreator jsb2.0
- Support Unity3D
- Support Unreal Engine 4
- Support ssl client with openssl
- Support async resolve with c-ares
- Support header only with
YASIO_HEAD_ONLY=1set at config.hpp or compiler flags
- Support Unix Domain Socket
- Support BinaryStram by obstream/ibstream, easy to use
- Support 7Bit Encoded Int/Int64 compatible with dotnet
yasio provide follow C++17 standard components compatible with C++11 compiler, please see: cxx17
- cxx20::starts_with, cxx20::ends_with