Liking cljdoc? Tell your friends :D

taoensso.sente.interfaces

Alpha, subject to change. Public interfaces / extension points.

Alpha, subject to change.
Public interfaces / extension points.
raw docstring

IClientWebSocketclj/s≠protocol

cws-close!clj/s

(cws-close! cws)

If the channel is open when called: closes the channel and returns true. Otherwise noops and returns false.

If the channel is open when called: closes the channel and returns true.
Otherwise noops and returns false.

cws-send!clj/s

(cws-send! cws msg)

If the socket is open when called: sends a message over socket and returns true. Otherwise noops and returns false.

If the socket is open when called: sends a message over socket and
returns true. Otherwise noops and returns false.

IPackerclj/s≠protocol

Extension pt. for client<->server comms data un/packers: arbitrary Clojure data <-> serialized strings.

Extension pt. for client<->server comms data un/packers:
arbitrary Clojure data <-> serialized strings.

packclj/s

(pack _ x)

unpackclj/s

(unpack _ x)
raw docstring

IServerChanclj/s≠protocol

sch-close!clj/s

(sch-close! sch)

If the channel is open when called: closes the channel and returns true. Otherwise noops and returns false.

If the channel is open when called: closes the channel and returns true.
Otherwise noops and returns false.

sch-open?clj/s

(sch-open? sch)

Returns true iff the channel is currently open.

Returns true iff the channel is currently open.

sch-send!clj/s

(sch-send! sch websocket? msg)

If the channel is open when called: sends a message over channel and returns true. Otherwise noops and returns false.

If the channel is open when called: sends a message over channel and
returns true. Otherwise noops and returns false.

IServerChanAdapterclj/s≠protocol

ring-req->server-ch-respclj/s

(ring-req->server-ch-resp sch-adapter ring-req callbacks-map)

Given a Ring request (WebSocket handshake or Ajax GET/POST), returns a Ring response map with a web-server-specific channel :body that implements Sente's IServerChan protocol.

Configures channel callbacks with a callbacks map using keys: :on-open - (fn [server-ch websocket?]) called exactly once after channel is available for sending. :on-close - (fn [server-ch websocket? status]) called exactly once after channel is closed for any cause, incl. an explicit call to close!. status type is currently undefined. :on-msg - (fn [server-ch websocket? msg]) called for each String or byte[] message received from client. :on-error - (fn [server-ch websocket? error]) currently unused.

Given a Ring request (WebSocket handshake or Ajax GET/POST), returns
a Ring response map with a web-server-specific channel :body that
implements Sente's IServerChan protocol.

Configures channel callbacks with a callbacks map using keys:
  :on-open  - (fn [server-ch websocket?]) called exactly once after
              channel is available for sending.
  :on-close - (fn [server-ch websocket? status]) called exactly once
              after channel is closed for any cause, incl. an explicit
              call to `close!`. `status` type is currently undefined.
  :on-msg   - (fn [server-ch websocket? msg]) called for each String or
              byte[] message received from client.
  :on-error - (fn [server-ch websocket? error]) currently unused.

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close