WebSocket transport support for nREPL, client side.
Connects to endpoints implemented by
drawbridge.websocket/ring-handler. Responses are pushed by the
server as they are produced, so unlike the HTTP long-poll transport
in drawbridge.client there is no polling and no added latency.
Uses the JDK's built-in WebSocket client (java.net.http), so no extra dependencies are required.
WebSocket transport support for nREPL, client side. Connects to endpoints implemented by `drawbridge.websocket/ring-handler`. Responses are pushed by the server as they are produced, so unlike the HTTP long-poll transport in `drawbridge.client` there is no polling and no added latency. Uses the JDK's built-in WebSocket client (java.net.http), so no extra dependencies are required.
(websocket-client-transport url)(websocket-client-transport url {:keys [http-headers]})Returns an nREPL client-side transport speaking JSON over
WebSocket, for endpoints implemented by
drawbridge.websocket/ring-handler.
Accepts an options map with the following keys:
:http-headers -- extra headers to send with the upgrade request,
e.g. {"Authorization" "Bearer <token>"}. When nil or absent,
falls back to drawbridge.client/default-http-headers (the nREPL
config); pass an empty map to send none despite the config.This fn is implicitly registered as the implementation of
nrepl.core/url-connect for the ws and wss schemes.
Returns an nREPL client-side transport speaking JSON over
WebSocket, for endpoints implemented by
`drawbridge.websocket/ring-handler`.
Accepts an options map with the following keys:
* `:http-headers` -- extra headers to send with the upgrade request,
e.g. {"Authorization" "Bearer <token>"}. When nil or absent,
falls back to `drawbridge.client/default-http-headers` (the nREPL
config); pass an empty map to send none despite the config.
This fn is implicitly registered as the implementation of
`nrepl.core/url-connect` for the `ws` and `wss` schemes.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |