webtasks.ws

Websocket API for ClojureScript

add-rmethod

(add-rmethod rmethod rmethod-fn)(add-rmethod my-ws rmethod rmethod-fn)

close

(close)(close my-ws)

close-event-codes

CLOSE_ABNORMAL

CLOSE_BAD_POLICY

CLOSE_GOING_AWAY

CLOSE_MISSING_EXTENSION

CLOSE_NO_STATUS

CLOSE_NORMAL

CLOSE_NOT_UTF8

CLOSE_PROTOCOL_ERROR

CLOSE_TLS_FAIL

CLOSE_TOO_LARGE

CLOSE_UNEXPECTED

closed?

(closed?)(closed? my-ws)

closing?

(closing?)(closing? my-ws)

connect

(connect ws-url)(connect my-ws ws-url)(connect my-ws ws-url id)

connecting?

(connecting?)(connecting? my-ws)

disconnect

(disconnect)(disconnect my-ws)

echo

(echo & args)

get-deferred

(get-deferred id)(get-deferred my-ws id)

get-reason

(get-reason code & [reason])

invoke-rmethod

(invoke-rmethod ws return rmethod args)

on-closed

(on-closed f)(on-closed my-ws f)

on-closing

(on-closing f)(on-closing my-ws f)

on-connecting

(on-connecting f)(on-connecting my-ws f)

on-message

(on-message f)(on-message my-ws f)

on-open

(on-open f)(on-open my-ws f)

open?

(open?)(open? my-ws)

reconnect

(reconnect ws-url)(reconnect my-ws my-url)

recv-fn

(recv-fn task chan value)

retry-connect

(retry-connect)(retry-connect my-ws)

retry-disable

(retry-disable)(retry-disable my-ws)

retry-enable

(retry-enable)(retry-enable my-ws)

retry-policy-default

rmethod

(rmethod my-ws return rmethod & args)

setup

(setup ws-url & [{:keys [connecting open closing closed message my-ws]} :as d-fns])

setup-deferreds

(setup-deferreds d-fns)(setup-deferreds my-ws d-fns)

UNSUPPORTED

write

(write value)(write my-ws value)

ws

ws-close

(ws-close ws)

ws-onclose

(ws-onclose ws)

ws-onerror

(ws-onerror ws)

ws-onmessage

(ws-onmessage ws)

ws-onopen

(ws-onopen ws)

xmit-fn

(xmit-fn task chan value)