(request-mapping-transport f)
Returns a transport-layer
which transforms the request being
handled. f
must be a function taking a single argument: the ctx
that caused the response.
Returns a [[transport-layer]] which transforms the request being handled. `f` must be a function taking a single argument: the ctx that caused the response.
(response-mapping-transport f)
Returns a transport-layer
which transforms the response being
passed back. f
must be a function taking 2 arguments, the ctx
that caused the response, and the response being handed back, and
must return the transformed response.
Returns a [[transport-layer]] which transforms the response being passed back. `f` must be a function taking 2 arguments, the ctx that caused the response, and the response being handed back, and must return the transformed response.
(receive* _ socket)
Read full Jupyter message from socket
. Not intended to be used directly,
use receive-stdin
or receive-req
instead.
Read full Jupyter message from `socket`. Not intended to be used directly, use `receive-stdin` or `receive-req` instead.
(send* _ socket msgtype message)
Send message
of type msgtype
on socket
. Not intended to be
used directly, use send-req
, send-stdin
, and send-iopub
instead.
Send `message` of type `msgtype` on `socket`. Not intended to be used directly, use `send-req`, `send-stdin`, and `send-iopub` instead.
(transport-layer {:keys [send-fn receive-fn message-fn]})
Defines middleware which transforms what is sent to the transport
from lower layers. send-fn
must be a function taking the 4
arguments: message
, socket
, msgtype
, and response
.
receive-fn
must be a function taking 2 arguments: message
and
socket
. message-fn
must be a function taking 1 argument:
message
and must return the ctx to be provided to the lower
layer.
Defines middleware which transforms what is sent to the transport from lower layers. `send-fn` must be a function taking the 4 arguments: `message`, `socket`, `msgtype`, and `response`. `receive-fn` must be a function taking 2 arguments: `message` and `socket`. `message-fn` must be a function taking 1 argument: `message` and must return the ctx to be provided to the lower layer.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close