Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create a websocket server on port:10100 #4

Open
yfsoftcom opened this issue Aug 8, 2020 · 0 comments
Open

create a websocket server on port:10100 #4

yfsoftcom opened this issue Aug 8, 2020 · 0 comments

Comments

@yfsoftcom
Copy link
Contributor

yfsoftcom commented Aug 8, 2020

Target:

  • transfer the data of mqtt & websocket

Backgroud:

  • the device can only connect the websocket server.
  • the platform can only connect the mqtt server.

so, the middleware should implement the websocket server to transfer the data or command .

Key Points:

  • the payload should constains _id, the service should generate a new short id bind with the _id.
  • all the message body should contains { id, payload }, the id is the short id , and the payload is the original websocket data.
  • the service should hold all the websocket connections, mark them with the sid.

Events:

  • #d2s/+/push

Reference:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant