From 78e3c4eb75178acf8358e46863ec81ad82eeefc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Mon, 26 Aug 2024 14:47:14 +0200 Subject: [PATCH 1/2] Update README.md to reflect the protocol --- packages/automerge-repo-network-websocket/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/automerge-repo-network-websocket/README.md b/packages/automerge-repo-network-websocket/README.md index 7e94a5be..337ecde8 100644 --- a/packages/automerge-repo-network-websocket/README.md +++ b/packages/automerge-repo-network-websocket/README.md @@ -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 From d41f8b35dd9b1a3d8f4b14ffdcc373d39aa5fa62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Mon, 26 Aug 2024 15:07:15 +0200 Subject: [PATCH 2/2] Update README.md --- packages/automerge-repo-network-websocket/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/automerge-repo-network-websocket/README.md b/packages/automerge-repo-network-websocket/README.md index 337ecde8..305c8613 100644 --- a/packages/automerge-repo-network-websocket/README.md +++ b/packages/automerge-repo-network-websocket/README.md @@ -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] ? metadata: peer_metadata, } ```