Liking cljdoc? Tell your friends :D

clunk.message-socket


close-message-socketclj/s

(close-message-socket ms)
source

closed-byclj/s

(closed-by ms)

The error that closed the connection, if one did and the platform keeps it: Node's socket does, as errored. The JVM fails while connecting instead.

The error that closed the connection, if one did and the platform keeps
it: Node's socket does, as errored. The JVM fails while connecting instead.
sourceraw docstring

connected?clj/s

(connected? ms)
source

get-message-socketclj/s

(get-message-socket port host ssl)

Connects; see byte-buffer-socket/get-buffer-socket. ssl is nil, or the TLS settings clunk.tls/connect takes.

Connects; see byte-buffer-socket/get-buffer-socket. ssl is nil, or the TLS
settings clunk.tls/connect takes.
sourceraw docstring

handle-backendclj/s

(handle-backend bs)
source

handle-frontendclj/s

(handle-frontend message)

Builds the bytes for a message, or for a vector of messages sent together.

Builds the bytes for a message, or for a vector of messages sent together.
sourceraw docstring

pauseclj/s

(pause {:keys [paused?]})

JS only: stops handling messages until resume. The socket stops reading too if another chunk arrives meanwhile.

JS only: stops handling messages until resume. The socket stops reading
too if another chunk arrives meanwhile.
sourceraw docstring

resumeclj/s

(resume {:keys [buffer-socket paused? drain]})
source

send!clj/s

(send! ms message)

Writes a frontend message, or a vector of messages, in one write.

Writes a frontend message, or a vector of messages, in one write.
sourceraw docstring

start!clj/s

(start! {:keys [buffer-socket paused? drain]} on-message on-chunk-end on-close)

Calls on-message with each backend message, in order, as it arrives, on-chunk-end after the messages of each socket read, and on-close once the connection ends. On the JVM they run on the connection's reader thread, which on-message may block to push back on the server. In JS, they run from the socket's events, and on-message pushes back by calling pause: no more messages are handled until resume.

Calls on-message with each backend message, in order, as it arrives,
on-chunk-end after the messages of each socket read, and on-close once
the connection ends. On the JVM they run on the connection's reader
thread, which on-message may block to push back on the server. In JS,
they run from the socket's events, and on-message pushes back by calling
pause: no more messages are handled until resume.
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