Liking cljdoc? Tell your friends :D

boundary.realtime.shell.adapters.websocket-adapter

WebSocket connection adapter for Ring/Jetty.

Wraps Ring WebSocket implementation to provide IWebSocketConnection protocol. Handles JSON encoding/decoding and WebSocket frame transmission.

Responsibilities (Shell/I/O):

  • Send messages over WebSocket (I/O operation)
  • Close WebSocket connections (I/O operation)
  • JSON encoding (external format transformation)
  • Error handling and logging
WebSocket connection adapter for Ring/Jetty.

Wraps Ring WebSocket implementation to provide IWebSocketConnection protocol.
Handles JSON encoding/decoding and WebSocket frame transmission.

Responsibilities (Shell/I/O):
- Send messages over WebSocket (I/O operation)
- Close WebSocket connections (I/O operation)
- JSON encoding (external format transformation)
- Error handling and logging
raw docstring

create-ring-websocket-adapterclj

(create-ring-websocket-adapter connection-id ws-channel)

Create WebSocket adapter for Ring WebSocket channel.

Args: connection-id - UUID for connection ws-channel - Ring WebSocket channel map with: :send! - Function to send message :close! - Function to close connection :open? - Function to check if open

Returns: RingWebSocketAdapter instance implementing IWebSocketConnection

Create WebSocket adapter for Ring WebSocket channel.

Args:
  connection-id - UUID for connection
  ws-channel - Ring WebSocket channel map with:
               :send! - Function to send message
               :close! - Function to close connection
               :open? - Function to check if open

Returns:
  RingWebSocketAdapter instance implementing IWebSocketConnection
sourceraw docstring

create-test-websocket-adapterclj

(create-test-websocket-adapter connection-id)

Create test WebSocket adapter for testing (in-memory).

Args: connection-id - UUID for connection

Returns: TestWebSocketAdapter instance with: - sent-messages atom (vector of sent messages) - open-state atom (boolean)

Create test WebSocket adapter for testing (in-memory).

Args:
  connection-id - UUID for connection

Returns:
  TestWebSocketAdapter instance with:
    - sent-messages atom (vector of sent messages)
    - open-state atom (boolean)
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close