{"id":25339758,"url":"https://github.com/simdsoft/yasio","last_synced_at":"2025-10-08T21:58:50.933Z","repository":{"id":43082989,"uuid":"38118583","full_name":"simdsoft/yasio","owner":"simdsoft","description":"A multi-platform support c++11 library with focus on asio (asynchronous socket I/O) for any client applications.","archived":false,"fork":false,"pushed_at":"2025-05-06T02:56:49.000Z","size":57388,"stargazers_count":995,"open_issues_count":2,"forks_count":227,"subscribers_count":53,"default_branch":"dev","last_synced_at":"2025-05-06T03:33:30.498Z","etag":null,"topics":["android","apple","asio","cpp11","cpp14","cpp17","ios","ipv6","js-bindings","kcp","linux","lua-bindings","multi-threading","socket","ssl","tcp","udp","unity3d","unrealengine","yasio"],"latest_commit_sha":null,"homepage":"https://global.simdsoft.com/yasio","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simdsoft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-26T15:28:33.000Z","updated_at":"2025-05-06T02:56:47.000Z","dependencies_parsed_at":"2024-05-01T16:08:23.348Z","dependency_job_id":"88fff600-cc89-44a0-a853-0073131ade89","html_url":"https://github.com/simdsoft/yasio","commit_stats":{"total_commits":3165,"total_committers":24,"mean_commits":131.875,"dds":0.09194312796208526,"last_synced_commit":"f3ea1db382e121854c7aa6f3f3b72991c7113568"},"previous_names":["simdsoft/yasio","yasio/yasio"],"tags_count":162,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simdsoft%2Fyasio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simdsoft%2Fyasio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simdsoft%2Fyasio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simdsoft%2Fyasio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simdsoft","download_url":"https://codeload.github.com/simdsoft/yasio/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198514,"owners_count":22030965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","apple","asio","cpp11","cpp14","cpp17","ios","ipv6","js-bindings","kcp","linux","lua-bindings","multi-threading","socket","ssl","tcp","udp","unity3d","unrealengine","yasio"],"created_at":"2025-02-14T07:16:06.429Z","updated_at":"2025-10-08T21:58:45.888Z","avatar_url":"https://github.com/simdsoft.png","language":"C++","readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://learn.simdsoft.com/yasio\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg width=\"160\" src=\"docs/assets/images/logo.png\" alt=\"yasio logo\"\u003e\u003c/a\u003e\u003c/p\u003e\r\n\r\n# *YASIO* - *Y*et *A*nother *S*ocket *I*/*O* library.\r\n\r\n[![Build Status](https://github.com/simdsoft/yasio/workflows/build/badge.svg)](https://github.com/simdsoft/yasio/actions?query=workflow%3Abuild)\r\n[![VS2013 Status](https://ci.appveyor.com/api/projects/status/xdmad4v3917n7rct?svg=true)](https://ci.appveyor.com/project/halx99/yasio)\r\n[![Latest Release](https://img.shields.io/github/v/release/yasio/yasio?include_prereleases\u0026label=release)](../../releases/latest)\r\n[![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu)\r\n[![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg)](https://github.com/yasio/yasio/blob/master/LICENSE)\r\n[![GitHub stars](https://img.shields.io/github/stars/yasio/yasio.svg?label=Stars)](https://github.com/yasio/yasio)\r\n[![GitHub forks](https://img.shields.io/github/forks/yasio/yasio.svg?label=Forks)](https://github.com/yasio/yasio)\r\n[![codeql](https://github.com/yasio/yasio/workflows/codeql/badge.svg)](https://github.com/yasio/yasio/actions?query=workflow%3Acodeql)  \r\n    \r\n**[English](README_EN.md)**\r\n  \r\n**yasio** 是一个轻量级跨平台的异步网络库，专注于客户端和基于各种游戏引擎的游戏客户端网络服务， 支持 windows、macos、ios、android、ohos、linux、freebsd 以及其他类 unix 操作系统。  \r\n\r\n## 支持平台\r\n\r\n- Windows\r\n- Android\r\n- iOS/tvOS/watchOS\r\n- Linux\r\n- macOS\r\n- FreeBSD\r\n- Solaris\r\n\r\n## 应用案例\r\n\r\n* [放置少女（HD）](http://hcsj.c4connect.co.jp/)：用于cocos和unity重制版客户端网络传输。\r\n* [红警OL手游项目](https://hongjing.qq.com/)：用于客户端网络传输，并且随着该项目于2018年10月17日由腾讯游戏发行正式上线后稳定运行于上千万移动设备上。\r\n* [x-studio软件项目](https://x-studio.net/)：网络解决方案。\r\n* [QttAudio](https://www.qttaudio.com/)：语音连麦聊天集成方案。\r\n\r\n## 集成案例\r\n\r\n* Unity\r\n  - [yasio_unity](https://github.com/yasio/yasio_unity)：Unity 纯C#封装，打开场景`SampleScene`运行即可。\r\n  - [xlua](https://github.com/yasio/xLua)：将yasio集成到xlua, 打开场景`U3DScripting`运行即可。\r\n* UnrealEngine\r\n  - [yasio_unreal](https://github.com/yasio/yasio_unreal)：yasio的UnrealEngine插件。\r\n  - [sluaunreal](https://github.com/yasio/sluaunreal)：集成到Tencent的sluaunreal。\r\n  - [UnLua](https://github.com/yasio/UnLua)：集成到Tencent的UnLua。\r\n* [axmol](https://github.com/axmolengine/axmol)：作为`axmol`游戏引擎的网络解决方案。\r\n\r\n## 文档\r\n\r\n* [https://learn.simdsoft.com/yasio](https://learn.simdsoft.com/yasio)\r\n\r\n## 使用g++快速运行tcptest测试程序\r\n\r\n```sh\r\ng++ tests/tcp/main.cpp --std=c++11 -DYASIO_HEADER_ONLY -lpthread -I./ -o tcptest \u0026\u0026 ./tcptest\r\n```\r\n\r\n## 使用CMake编译yasio的测试程序和示例程序\r\n\r\n```sh\r\ngit clone --recursive https://github.com/simdsoft/yasio\r\ncd yasio\r\n\r\n# 如果是 macOS Xcode, 这里命令应该换成：cmake -B build -GXcode\r\ncmake -B build\r\n\r\n# 使用CMake命令行编译, 如果需要调试，则使用相应平台IDE打开即可:\r\n# a. Windows：使用VisualStudio打开build/yasio.sln\r\n# b. macOS：使用Xcode打开build/yasio.xcodeproj\r\ncmake --build build --config Debug\r\n\r\n# # 者直接用VS打开 \r\n```\r\n\r\n## 特性：\r\n\r\n* 支持TCP，UDP，KCP传输，且API是统一的。\r\n* 支持TCP粘包处理，业务完全不必关心。\r\n* 支持组播。\r\n* 支持IPv4/IPv6或者苹果IPv6_only网络。\r\n* 支持处理多个连接的所有网络事件。\r\n* 支持微秒级定时器。\r\n* 支持Lua绑定。\r\n* 支持Cocos2d-x jsb绑定。\r\n* 支持[CocosCreator jsb2.0绑定](https://github.com/yasio/inettester)。\r\n* 支持[Unity3D](https://github.com/yasio/yasio_unity)。\r\n* 支持[虚幻引擎](https://github.com/yasio/yasio_unreal)。\r\n* 支持SSL客户端/服务端, 基于OpenSSL/MbedTLS。\r\n* 支持非阻塞域名解析，基于c-ares。\r\n* 支持Header Only集成方式，只需要定义编译预处理器宏```YASIO_HEAD_ONLY=1```即可。\r\n* 支持Unix Domain Socket。\r\n* 支持二进制读写，两个工具类**obstream/ibstream**非常方便使用。\r\n* 支持和.net兼容的整数压缩编码方式：**7Bit Encoded Int/Int64**。\r\n\r\n## 关于C++14/17/20\r\n\r\nyasio提供了如下可在C++11编译器下使用的C++14/17/20标准库组件，请查看 [yasio/string_view.hpp](yasio/string_view.hpp), [yasio/shared_mutex.hpp](yasio/shared_mutex.hpp), [yasio/memory.hpp](yasio/memory.hpp)\r\n\r\n- cxx14::make_unique\r\n- cxx17::string_view\r\n- cxx17::shared_mutex\r\n- cxx20::starts_with\r\n- cxx20::ends_with\r\n- yasio::byte_buffer\r\n- yasio::pod_vector\r\n\r\n## 关于 OpenSSL 预编译库 (Windows)\r\n\r\nyasio 的 cmake 脚本默认选择 OpenSSL 作为 SSL 支持库，并且会自动从[1kiss](https://github.com/simdsoft/1kiss)下载， \r\n且预编译库使用 `VS2022(MSVC-14.39)` 编译，如果你的系统未安装该版本，请传入 CMake 参数`-DYASIO_SSL_BACKEND=2`，例如使用项目\r\n提供的跨平台一键编译脚本 `build.ps1`\r\n\r\n```bat\r\npowershell build.ps1 -p win32 -a x64 -xc \"-DYASIO_SSL_BACKEND=2\"\r\n```\r\n\r\n## 框架图\r\n\r\n![image](docs/assets/images/framework.png)  \r\n\r\n## QQ交流群\r\n\r\n点击加入：[829884294](https://jq.qq.com/?_wv=1027\u0026k=5LDEiNv)\r\n\r\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimdsoft%2Fyasio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimdsoft%2Fyasio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimdsoft%2Fyasio/lists"}