Liking cljdoc? Tell your friends :D

ring.websocket

Protocols and utility functions for websocket support.

Protocols and utility functions for websocket support.
raw docstring

BinaryDatacljprotocol

A protocol for converting binary data into a java.nio.ByteBuffer object.

A protocol for converting binary data into a java.nio.ByteBuffer object.

->byte-bufferclj

(->byte-buffer data)

Convert some binary data into a java.nio.ByteBuffer, ready to be sent as a websocket binary message.

Convert some binary data into a java.nio.ByteBuffer, ready to be sent as
a websocket binary message.
sourceraw docstring

closeclj

(close socket)
(close socket code reason)

Closes the websocket, with an optional custom integer status code and reason string.

Closes the websocket, with an optional custom integer status code and reason
string.
sourceraw docstring

open?clj

(open? socket)

Returns true if the Socket is open, false otherwise.

Returns true if the Socket is open, false otherwise.
sourceraw docstring

pingclj

(ping socket)
(ping socket data)

Sends a ping message via a websocket, with an optional byte array or ByteBuffer that may contain custom session data. A convenient wrapper for the -ping protocol method.

Sends a ping message via a websocket, with an optional byte array or
ByteBuffer that may contain custom session data. A convenient wrapper for the
-ping protocol method.
sourceraw docstring

pongclj

(pong socket)
(pong socket data)

Sends an unsolicited pong message via a websocket, with an optional byte array or ByteBuffer that may contain custom session data. A convenient wrapper for the -pong protocol method.

Sends an unsolicited pong message via a websocket, with an optional byte
array or ByteBuffer that may contain custom session data. A convenient wrapper
for the -pong protocol method.
sourceraw docstring

request-protocolsclj

(request-protocols request)

Returns a collection of websocket subprotocols from a request map.

Returns a collection of websocket subprotocols from a request map.
sourceraw docstring

sendclj

(send socket message)
(send socket message succeed fail)

Sends text or binary data via a websocket, either synchronously or asynchronously with callback functions. A convenient wrapper for the -send and -send-async protocol methods.

Sends text or binary data via a websocket, either synchronously or
asynchronously with callback functions. A convenient wrapper for the -send and
-send-async protocol methods.
sourceraw docstring

TextDatacljprotocol

A protocol for converting text data into a String.

A protocol for converting text data into a String.

->char-sequenceclj

(->char-sequence data)

Convert some data into a CharSequence, ready to be sent as a websocket text message.

Convert some data into a CharSequence, ready to be sent as a websocket
text message.
sourceraw docstring

upgrade-request?clj

(upgrade-request? request)

Returns true if the request map is a websocket upgrade request.

Returns true if the request map is a websocket upgrade request.
sourceraw docstring

websocket-response?clj

(websocket-response? response)

Returns true if the response contains a websocket listener.

Returns true if the response contains a websocket listener.
sourceraw docstring

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

× close