Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

NtyCo

> 编程语言
Open source

纯c版本的协程实现,汇编切换,调度器实现,包含服务器端案例,客户端并发测试案例

949 stars0 likes0 views
WebsiteGitHub

About

纯c版本的协程实现,汇编切换,调度器实现,包含服务器端案例,客户端并发测试案例

NtyCo

coroutine

实现原理 配套视频讲解

details

coroutine FSM

storage structure (ready, wait, sleep, status)

nty_server process

compile

编译ntyco的core文件与编译libntyco.a的静态库
$ make

// 编译sample
$ make bin

err info

nty_mysql_oper.c:8:19: fatal error: mysql.h: No such file or directory

解决方案:
# sudo apt-get install libmysqlclient-dev

nty_rediscli.c:11:21: fatal error: hiredis.h: No such file or directory

解决方案:
需要编译安装hiredis: https://github.com/redis/hiredis

server

$ ./bin/nty_server

client

./bin/nty_client

mul_process, mul_core

$ ./bin/nty_server_mulcore

websocket

$ ./bin/nty_websocket_server

bench

$ ./bin/nty_bench

http server

$ ./bin/nty_http_server_mulcore
对应视频讲解

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ccoroutinetinyhttpdwebbench

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言