一个轻量级的游戏服务器框架,底层采用C++17编写,逻辑层采用Lua脚本。
- asio-1.10.6(without boost)
- lua云风修改版
- sol2(a C++ library binding to Lua)
- rapidjson
git clone https://github.com/sniper00/moon.git get the Sources
需要使用premake生成工程文件, 下载最新的premake5
The project use of C++17 features, I tested compliers are:
- GCC 7.2
- Visual Studio 2017 Community Update 5
Windows Platform:
premake5.exe vs2017
Linux Platform:
premake5 gmake
make
# Release版
# make config=release_linux
https://github.com/sniper00/BallGame
网络通信和websocket示例
- 命令行输入
./moon 1
运行服务器 - 2字节大端表示长度的协议:python 运行echoclient.py 脚本
- websocket: wesocket_client.html
非阻塞redis client, 默认连接 127.0.0.1 6379
- 命令行输入
./moon 2
服务间发送消息示例
- 命令行输入
./moon 3
- 命令行输入
./moon 4
call示例
进程间发送消息示例
- 命令行输入
./moon 5
- 命令行输入
./moon 6
用Socket API和协程实现的简单HttpServer示例
- 命令行输入
./moon 7
QQ交流群543833695