Git Product home page Git Product logo

toy-engine's Introduction

Toy-Engine

A lightweight server framework

Wiki

1.该框架由lua和c编写,非分布式,没有服务的概念,只有一个VM,一条工作线程.
  该框架核心模块提取自云风老师的skynet框架.设计上也参考了skynet源代码[https://github.com/cloudwu/skynet]
  可以认为是一个简陋的单VM版skynet,目前只支持了CS socket通信,定时器,toy-engine节点间通信等功能,与三方进程(如mysql,mongodb,redis)通信的功能暂未支持.
2.examples/chatroom 为一个多人聊天室的简例,客户端程序可从终端读入消息,
  服务器广播给所有玩家,服务器定时向全部玩家发送server tick消息.
  examples/cluster 为一个节点间通信的简例,每隔2s向对方节点发送handshake消息包,对方收到后回复.
3.该框架仅用于学习娱乐,没有任何商业价值.

三方库

lua5.3.4源码[https://www.lua.org/ftp/lua-5.3.4.tar.gz]

编译链接

make

环境搭建

多人聊天室:
    服务器: sh examples/chatgs.sh
    客户端: sh examples/chatcs.sh (port) (ip) #可多终端启动
节点间通信:
    sh examples/cluster.sh 1
    sh examples/cluster.sh 2

toy-engine's People

Contributors

xingshuo avatar

Watchers

skyformat99 avatar  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.