From b4e3d7ee5be302ac9b94e573d7a2447ac21f4d75 Mon Sep 17 00:00:00 2001 From: Arkady Bazhanov Date: Thu, 3 Apr 2025 11:14:06 +0200 Subject: [PATCH] Update websocket-protocols documentation to reflect implementation The doc didn't state that a WebSocket message has to start with the number of offsets, while the implementation was relying on that: https://github.com/jupyter-server/jupyter_server/blob/2cf8ac5b2bc2aa6aeb14a6e3f56230c160604b4b/jupyter_server/services/kernels/connection/base.py#L58 --- docs/source/developers/websocket-protocols.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/source/developers/websocket-protocols.rst b/docs/source/developers/websocket-protocols.rst index 72017e86d7..3df85bd930 100644 --- a/docs/source/developers/websocket-protocols.rst +++ b/docs/source/developers/websocket-protocols.rst @@ -53,12 +53,14 @@ The Jupyter Server must support the default protocol, in which a kernel message * - 0 - 4 - 8 + - 12 - ... - offset_0 - offset_1 - offset_2 - ... - * - offset_0 + * - offset_number + - offset_0 - offset_1 - offset_2 - ... @@ -69,6 +71,7 @@ The Jupyter Server must support the default protocol, in which a kernel message Where: +* ``offset_number`` is the number of the following offsets (is equal to the number of binary buffers plus one). * ``offset_0`` is the position of the kernel message (``msg``) from the beginning of this message, in bytes. * ``offset_1`` is the position of the first binary buffer (``buffer_0``) from the beginning of this message, in bytes (optional). * ``offset_2`` is the position of the second binary buffer (``buffer_1``) from the beginning of this message, in bytes (optional).