diff --git a/src/main/asciidoc/http.adoc b/src/main/asciidoc/http.adoc index f6622cb490f..2c415b0d8b7 100644 --- a/src/main/asciidoc/http.adoc +++ b/src/main/asciidoc/http.adoc @@ -1896,12 +1896,14 @@ used with binary frames that are no split over multiple frames. ==== Event bus handlers -Every WebSocket automatically registers two handler on the event bus, and when any data are received in this handler, -it writes them to itself. Those are local subscriptions not routed on the cluster. +Every WebSocket can register two handlers on the event bus, and when any data are received in these handlers, +it writes the data to itself. Those are local subscriptions, not reachable from other clustered nodes. This enables you to write data to a WebSocket which is potentially in a completely different verticle sending data to the address of that handler. +This feature is disabled by default, however you can enable it using {@link io.vertx.core.http.HttpServerOptions#setRegisterWebSocketWriteHandlers} or {@link io.vertx.core.http.WebSocketConnectOptions#setRegisterWriteHandlers}. + The addresses of the handlers are given by {@link io.vertx.core.http.WebSocket#binaryHandlerID()} and {@link io.vertx.core.http.WebSocket#textHandlerID()}. diff --git a/src/main/asciidoc/net.adoc b/src/main/asciidoc/net.adoc index b991c7a0550..6c642735cb6 100644 --- a/src/main/asciidoc/net.adoc +++ b/src/main/asciidoc/net.adoc @@ -124,12 +124,14 @@ exceptions that happens before the connection is passed to the {@link io.vertx.c === Event bus write handler -Every socket automatically registers a handler on the event bus, and when any buffers are received in this handler, -it writes them to itself. Those are local subscriptions not routed on the cluster. +Every socket can register a handler on the event bus, and when any buffers are received in this handler, +it writes them to itself. Those are local subscriptions, not reachable from other clustered nodes. This enables you to write data to a socket which is potentially in a completely different verticle by sending the buffer to the address of that handler. -The address of the handler is given by {@link io.vertx.core.net.NetSocket#writeHandlerID()} +This feature is disabled by default, however you can enable it using {@link io.vertx.core.net.NetServerOptions#setRegisterWriteHandler} or {@link io.vertx.core.net.NetClientOptions#setRegisterWriteHandler}. + +The address of the handler is given by {@link io.vertx.core.net.NetSocket#writeHandlerID()}. === Local and remote addresses