GithubHelp home page GithubHelp logo

breeze0116 / skynet_pbc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bytemode/skynet_pbc

0.0 1.0 0.0 118 KB

skyne use pbc protobuf

License: MIT License

Shell 0.31% Lua 94.42% Makefile 1.44% PureBasic 0.99% Protocol Buffer 2.84%

skynet_pbc's Introduction

skynet使用pbc解析protobuf,使用socket和客户端通信。

服务器编译步骤:

clone完整的代码 代码中引用了skynet和pbc
git clone https://github.com/gameloses/skynet_pbc.git

cd skynet_pbc
git submodule init
git submodule update

cd skynet
git submodule init
git submodule update

编译skynet

cd skynet
make linux

编译pbc

cd ../3rd/pbc
make

cd binding
cd lua53
make

如果提示找不到lua.h则需要安装一下lua5.3. make && make install
(或者修改一下Makefile文件,设置lua.h的路径)

将protobuf.lua复制到根目录的lualib目录
protobuf.so文件复制到根目录的luaclib目录

编译proto文件

回到根目录
make

如果没有安装protobuf的话会报错,因为要使用到protoc
yum install protobuf-devel.x86_64
yum install protobuf.x86_64

运行

. run.sh
具体教程见wiki

使用cocos2dx 测试一下连接。

clinet的地址: https://github.com/gameloses/cocos2dx_lua_skynet_client.git

skynet_pbc's People

Contributors

bytemode avatar

Watchers

Breeze avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.