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

Update documentation of the wire protocol's join message #378

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/automerge-repo-network-websocket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ Handshake is the following steps:

- Once a connection is established the initiating peer sends a
[join](#join) message with the `senderId` set to the initiating peers ID and
the `protocolVersion` set to "1"
a `supportedProtocolVersions` array containing "1"
- The receiving peer waits until it receives a message from the initiating
peer, if the initiating peer receives a message before sending the join message
the initiating peer SHOULD terminate the connection.
- When the receiving peer receives the join message
- if the `protocolVersion` is not "1" the receiving peer sends an
- if the `supportedProtocolVersions` does not contain "1" the receiving peer sends an
[error](#error) message and terminates the connection
- otherwise
- store the `senderId` as the peer ID of the initiating peer
Expand Down Expand Up @@ -119,7 +119,7 @@ Sent by the initiating peer in the [handshake](#handshake) phase.
{
type: "join",
senderId: peer_id,
supportedProtocolVersions: protocol_version
supportedProtocolVersions: [protocol_version]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? metadata: peer_metadata,
}
```
Expand Down
Loading