Skip to content

WebSocket API

Igal edited this page Apr 8, 2017 · 13 revisions

WebSocket API

The WebSocket object is passed into many of the event handling methods as an argument named websocket. It implements the javax.websocket.Session interface, and allows you to interact with the connection via the methods below.

getAsyncRemote()

getBasicRemote()

getConnectionManager()

getId()

getApplicationScope()

getSessionScope()

getMaxIdleTimeout()

getOpenSessions()

getRequestURI()

getUserProperties()

isOpen()

isSecure()

sendText(string message)

sendTextAsync(string message)

setMaxIdleTimeout(long milliseconds)

subscribe(string channel)

unsubscribe(string channel)

unsubscribeAll(string channel)

Clone this wiki locally