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

feat: layer2 websocket #4753

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

feat: layer2 websocket #4753

wants to merge 4 commits into from

Conversation

nugaon
Copy link
Member

@nugaon nugaon commented Aug 9, 2024

Introducing on-demand stream messaging channels between Bee nodes so that other P2P applications can communicate between each other directly to support live services.

On GET /layer2/subscribe/{streamName} endpoint the client opens a websocket connection through which messages can pass between connected nodes (which can be managed by calling POST /connect/{multiAddress} or DELETE /peer/{address}

The PR is experimental in design and discussions are open for the feature.

send message format:
[actionType] [actionParams]
available actionTypes:

  • 0: unicast - send message to a node
    • actionParams:
      • overlay address of the target node
      • message
  • 1: broadcast - send message to all connected node
    • actionParams:
      • message

received message format
[responseType] [responseParams]

available responseType

  • 0: message
    • responseParams
      • overlay address of the sender node
      • message

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

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

Successfully merging this pull request may close these issues.

1 participant