vertx.http.websocket documentation
Provides a set of functions for using http websockets.
connect
(connect client uri handler)(connect client uri version handler)(connect client uri version header handler)
Connect the HTTP client to a websocket at the specified URI.
version allows you to force the protocol version to one
of: :RFC6455, :HYBI-00, or :HYBI-08. handler can either be a
single-arity fn or a Handler instance that will be passed the
WebSocket when a successful connection is made. Returns the
client.
on-websocket
(on-websocket server handler)
Sets the websocket handler for the HTTP server.
handler can either be a single-arity fn or a Handler instance that
will be passed the ServerWebSocket when a successful connection is
made.
remote-address
(remote-address socket)
Returns the remote address for the socket as an address-map of the
form {:address "127.0.0.1" :port 8888 :basis inet-socket-address-object}write-binary-frame
(write-binary-frame ws data)
Write data Buffer to websocket as a binary frame.
Returns the websocket.
write-text-frame
(write-text-frame ws data)
Write data String to websocket as a text frame.
Returns the websocket.