Code Monkey home page Code Monkey logo

qgateway's Introduction

QGateway

采用websocket模式。实现发送,接收。

queue模式

  • router (路由模式)
  • pubsub (懂得都懂)

配置方式查看config.yaml

命令请求格式

//登陆 认证模式
{"cmdId":0, "args":{"token":"b0107179-42b4-39dd-8220-f48a84b4cef7"}}
//登陆 guest模式
{"cmdId":0, "args":{"token":""}}

//发送消息 (router模式)
{"cmdId":1, "args":{"value": "halo", "key": "呜呜呜", "token":"c09c21f8-c29d-3fb3-86a8-39109742c802"}}
//订阅消息 (router模式) (单key)
{"cmdId":2, "args":{"key": "呜呜呜", "token":"c09c21f8-c29d-3fb3-86a8-39109742c802"}}
//订阅消息 (router模式) (array key)
{"cmdId":2, "args":{"keys": ["呜呜呜"], "token":"c09c21f8-c29d-3fb3-86a8-39109742c802"}}

//发送消息 (pubsub模式)
{"cmdId":1, "args":{"value": "halo", "token":"c09c21f8-c29d-3fb3-86a8-39109742c802"}}
//订阅消息 (pubsub模式)
{"cmdId":2, "args":{"token":"c09c21f8-c29d-3fb3-86a8-39109742c802"}}

命令cmd_id

-1: ping/pong
 0: 校验token arg: {'token': '嘿嘿嘿'}
 1: 发送消息 arg: value: object数据, (选填,看队列模式)key: 我的大名, token: 队列绑定
 2: 接收消息 arg: (选填,看队列模式)key: 我的大名, token: 队列绑定

qgateway's People

Contributors

qsxzaqq 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.