From 5bfe2f47f53050ae4559e7517dfcfaebb27f9291 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Thu, 11 Nov 2021 15:07:23 +1100 Subject: [PATCH] Issue #2690 - clarify websocket message ordering in documentation Signed-off-by: Lachlan Roberts --- .../programming-guide/server/websocket/server-websocket.adoc | 1 + .../src/main/asciidoc/programming-guide/websocket.adoc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/websocket/server-websocket.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/websocket/server-websocket.adoc index 6db4ab470669..fee8aefcda1a 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/websocket/server-websocket.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/websocket/server-websocket.adoc @@ -41,3 +41,4 @@ If your application needs specific features that are not provided by the standar include::server-websocket-standard.adoc[] include::server-websocket-jetty.adoc[] include::server-websocket-filter.adoc[] +include::../../websocket.adoc[] diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/websocket.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/websocket.adoc index 42171af4e039..70cfd128df5f 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/websocket.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/websocket.adoc @@ -46,6 +46,8 @@ This event is emitted when the WebSocket communication encounters a fatal error, Applications interested in the error event receive a `Throwable` that represent the error. * The _message_ event. The message event is emitted when a WebSocket message is received. +Only a single thread will be delivering a message event at any one time, and the next message event will not be triggered until the previous one has exited its onMessage method. +Endpoints will always be notified of message events in the same order they were received over the network. The message event can be of two types: ** Textual message event. Applications interested in this type of messages receive a `String` representing the UTF-8 bytes received.