All Projects → yasio → Yasio

yasio / Yasio

Licence: other
A multi-platform support c++11 library with focus on asio (asynchronous socket I/O) for any client application.

Programming Languages

cpp11
221 projects
cpp17
186 projects
cpp14
131 projects

Projects that are alternatives of or similar to Yasio

Elixir Socket
Socket wrapping for Elixir.
Stars: ✭ 642 (+32.92%)
Mutual labels:  tcp, socket, udp, ssl
Packetsender
Network utility for sending / receiving TCP, UDP, SSL
Stars: ✭ 1,349 (+179.3%)
Mutual labels:  tcp, udp, ipv6, ssl
Hp Socket
High Performance TCP/UDP/HTTP Communication Component
Stars: ✭ 4,420 (+815.11%)
Mutual labels:  tcp, socket, udp, ssl
Netcat
💻 Netcat client and server modules written in pure Javascript for Node.js.
Stars: ✭ 315 (-34.78%)
Mutual labels:  tcp, socket, udp
RRQMSocket
TouchSocket是.Net(包括 C# 、VB.Net、F#)的一个整合性的、超轻量级的网络通信框架。包含了 tcp、udp、ssl、http、websocket、rpc、jsonrpc、webapi、xmlrpc等一系列的通信模块。一键式解决 TCP 黏分包问题,udp大数据包分片组合问题等。使用协议模板,可快速实现「固定包头」、「固定长度」、「区间字符」等一系列的数据报文解析。
Stars: ✭ 286 (-40.79%)
Mutual labels:  socket, tcp, udp
KingNetwork
KingNetwork is an open source library to facilitate the creation and communication of clients and servers via TCP, UDP, WebSocket and RUDP sockets.
Stars: ✭ 78 (-83.85%)
Mutual labels:  socket, tcp, udp
gnb udp over tcp
gnb_udp_over_tcp 是一个为GNB开发的通过tcp链路中转UDP分组转发的服务
Stars: ✭ 32 (-93.37%)
Mutual labels:  socket, tcp, udp
Socketify
Raw TCP and UDP Sockets API on Desktop Browsers
Stars: ✭ 67 (-86.13%)
Mutual labels:  socket, tcp, udp
net-protocol
golang模拟内核协议栈 实现链路层、网络层、传输层、应用层 用户态协议栈 ,基于虚拟网卡TUN/TAP
Stars: ✭ 129 (-73.29%)
Mutual labels:  tcp, ipv6, udp
Networker
A simple to use TCP and UDP networking library for .NET. Compatible with Unity.
Stars: ✭ 408 (-15.53%)
Mutual labels:  unity3d, tcp, udp
ddos
Simple dos attack utility
Stars: ✭ 36 (-92.55%)
Mutual labels:  socket, tcp, udp
masscanned
Let's be scanned. A low-interaction honeypot focused on network scanners and bots. It integrates very well with IVRE to build a self-hosted alternative to GreyNoise.
Stars: ✭ 50 (-89.65%)
Mutual labels:  tcp, ipv6, udp
ronin-support
A support library for Ronin. Like activesupport, but for hacking!
Stars: ✭ 23 (-95.24%)
Mutual labels:  ssl, tcp, udp
Socket
The Hoa\Socket library.
Stars: ✭ 61 (-87.37%)
Mutual labels:  socket, tcp, udp
Swiddler
TCP/UDP debugging tool.
Stars: ✭ 56 (-88.41%)
Mutual labels:  ssl, tcp, udp
socket
Dazzle Async Socket
Stars: ✭ 19 (-96.07%)
Mutual labels:  socket, tcp, udp
ebook
Third edition of the Computer Networking: Principles, Protocols and Practice ebook
Stars: ✭ 64 (-86.75%)
Mutual labels:  tcp, ipv6, udp
Cnp3
Computer Networking : Principles, Protocols and Practice (first and second edition, third edition is being written on https://github.com/cnp3/ebook)
Stars: ✭ 471 (-2.48%)
Mutual labels:  tcp, udp, ipv6
XAsyncSockets
XAsyncSockets is an efficient Python/MicroPython library of managed asynchronous sockets.
Stars: ✭ 28 (-94.2%)
Mutual labels:  ssl, tcp, udp
dperf
dperf is a DPDK based 100Gbps network performance and load testing software.
Stars: ✭ 1,320 (+173.29%)
Mutual labels:  tcp, ipv6, udp

yasio logo

YASIO - Yet another Asynchronous Socket I/O.

Android Build Status iOS Build Status Windows Build Status Linux Build Status macOS Build Status FreeBSD Build Status

Release 996.icu LICENSE GitHub stars GitHub forks Language grade: C/C++ Total alerts

Supported Platforms

Powered

English

yasio 是一个轻量级跨平台的异步socket库,专注于客户端和基于各种游戏引擎的游戏客户端网络服务, 支持windows & linux & apple & android & win10-universal。

应用案例

  • 红警OL手游项目: 用于客户端网络传输,并且随着该项目于2018年10月17日由腾讯游戏发行正式上线后稳定运行于上千万移动设备上。
  • x-studio软件项目: 用于实现局域网UDP+TCP发现更新机制。

集成案例

  • Unity
    • OpenNSM2: Unity 纯C#封装,打开场景SampleScene运行即可。
    • xlua: 将yasio集成到xlua, 打开场景U3DScripting运行即可。
  • Unreal Engine 4
    • DemoUE4: 将yasio集成到Unreal Engine 4。
    • sluaunreal: 集成到Tencent的sluaunreal。
    • UnLua: 集成到Tencent的UnLua。
  • Engine-x: 作为Engine-x游戏引擎的异步TCP解决方案。

文档

使用g++快速运行tcptest测试程序

g++ tests/tcp/main.cpp --std=c++11 -DYASIO_HEADER_ONLY -lpthread -I./ -o tcptest && ./tcptest

使用CMake编译yasio的测试程序和示例程序

git clone https://github.com/yasio/yasio
cd yasio
git submodule update --init --recursive

# 如果是macOS Xcode, 这里命令应该换成: cmake -B build -GXcode
cmake -B build

# 使用CMake命令行编译, 如果需要调试,则使用相应平台IDE打开即可:
# a. Windows: 使用VisualStudio打开build/yasio.sln
# b. macOS: 使用Xcode打开build/yasio.xcodeproj
cmake --build build --config Debug

# # 者直接用VS打开 

特性:

  • 支持TCP,UDP,KCP传输,且API是统一的。
  • 支持TCP粘包处理,业务完全不必关心。
  • 支持组播。
  • 支持IPv4/IPv6或者苹果IPv6_only网络。
  • 支持处理多个连接的所有网络事件。
  • 支持微秒级定时器。
  • 支持Lua绑定。
  • 支持Cocos2d-x jsb绑定。
  • 支持CocosCreator jsb2.0绑定
  • 支持Unity3D
  • 支持虚幻4
  • 支持SSL客户端,基于OpenSSL/MbedTLS。
  • 支持非阻塞域名解析,基于c-ares。
  • 支持Header Only集成方式,只需要定义编译预处理器宏YASIO_HEAD_ONLY=1即可。
  • 支持Unix Domain Socket。
  • 支持二进制读写,两个工具类obstream/ibstream非常方便使用。
  • 支持和.net兼容的整数压缩编码方式: 7Bit Encoded Int/Int64

关于C++17

yasio提供了如下可在C++11编译器下使用的C++17标准库组件, 请查看 cxx17

  • cxx17::string_view
  • cxx17::shared_mutex
  • cxx20::starts_with, cxx20::ends_with

发送延迟

yasio比同样使用消息队列的Cocos2d-x WebSocket实现处理发送消息快30倍以上:

网络实现 发送延迟
yasio 0.06 ~ 0.1(ms)
Cocos2d-X WebSocket > 3~5(ms)

参考: Cocos2d-X WebSocket.cpp

框架图

image

QQ交流群

点击加入:829884294

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].