sylar
项目介绍
C++的高性能服务器框架,支持协程,线程,hook,Http,Websocket,SSL,日志模块,配置模块等模块
支持动态库方式,加载业务代码,支持业务热更新
使用方式:
编译库
git clone https://github.com/sylar-yin/sylar.git
cd sylar
make
make -j
使用库创建项目
sh generate.sh ${project-name} ${name-space}
cd ${project-name}
make
make -j
sh move.sh #编译完成后,move可执行文件和动态库
bin/${project-name} -s #执行
依赖环境和安装
视频教程地址
开发环境
Centos7
gcc 9.1
cmake
ragel
项目路径
bin -- 二进制
build -- 中间文件路径
cmake -- cmake函数文件夹
CMakeLists.txt -- cmake的定义文件
lib -- 库的输出路径
Makefile
sylar -- 源代码路径
tests -- 测试代码
日志系统
1)
Log4J
Logger (定义日志类别)
|
|