Coder Social home page Coder Social logo

one-demo's Introduction

one框架的一些例子
https://github.com/lizhichao/one

one框架Demo

框架文档地址

安装

composer create-project lizhichao/one-demo

使用例子

websocket使用例子

代码地址

带路由例子

#启动
php App/swoole.php test_ws_router

#测试地址
http://127.0.0.1:8081/ws/router

#打开浏览器控制台 send(url,content)
send('a','xxxx')

不带路由例子

#启动
php App/swoole.php test_ws

#测试地址
http://127.0.0.1:8081/ws

#打开浏览器控制台 send(content)
send('xxxx')

orm模型使用例子

代码地址

tcp使用例子

带路由例子

#启动
php App/swoole.php test_tcp_router

不带路由例子

#启动
php App/swoole.php test_tcp

各种混合协议之间相互通讯例子

http webSocket Tcp 相互通讯

代码地址

只要swoole支持的协议都可以,这里就不一一举例了

#启动globalData
php App/swoole.php global_data

#启动服务
php App/swoole.php test_all

#打开地址
http://127.0.0.1:8081/mix

task任务使用例子

rpc调用例子

globalData进程之间内存共享使用例子

路由中间件使用例子

小提示

php App/swoole.php xxx 其实就是启动Config下xxx.php配置的swoole服务器

one-demo's People

Contributors

huanghantao avatar lizhichao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

one-demo's Issues

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.