• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jwcpp/jwEngine: A cross-platform C++<->lua server quick solution

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

jwcpp/jwEngine

开源软件地址(OpenSource Url):

https://github.com/jwcpp/jwEngine

开源编程语言(OpenSource Language):

C 51.8%

开源软件介绍(OpenSource Introduction):

jwEngine

一个跨平台的c++<->lua服务器快速解决方案,该框架即可快速响应服务器开发工作,设计思想:“让事情变得更简单”
A cross platform C + + < - > Lua server fast solution, the framework can quickly respond to the server development work, the design idea: "make things easier"

c++ tcp server

class INetEvent : public NetEvent
{
public:
    virtual void onAccept(NetConnect * conn){}
    virtual void onClose(NetConnect * conn){}
    virtual void onMsg(NetConnect * conn, int msgtype, NetPacket * pack){}
};

int main()
{
    EventLoop::Instance()->init();

    INetEvent eve;
    NetServer server(EventLoop::Instance(), &eve);
    server.listen("127.0.0.1", 3001);

    return EventLoop::Instance()->run();
}

lua tcp server

event_init()

server = NetServer:new()
server.on_accept = function(conn)
end

server.on_close = function(conn)
end

server.on_msg = function(conn, msgtype, pack)
end

server:listen("127.0.0.1", 3001, false)

event_run()

start run

base process cell process db process
start engine.exe base.lua start engine.exe cell.lua start engine.exe db.lua

serialization

The serialization tool provided is experimental and may be fragile. It is recommended to use more powerful protobuf

Integrated open source library

libuv
sol2
concurrentqueue
lua
hiredis
kcp
lua-protobuf
http-parser
llhttp

Learn more

For more examples, please refer to example

我的另一个项目:jwServer

有任何建议、BUG、疑问,统一解决QQ群:458421068
My email: [email protected]




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap