You interact with SockJS clients through instances of SockJS socket.

The API is very similar to WebSocket. It provides access to both readStream and writeStream so it can be used with Pump to pump data with flow control.

Instances of this class are not thread-safe.

no subtypes hierarchy

SockJSSocket(SockJSSocket delegate)
headersshared MultiMap headers

Return the headers corresponding to the last request for this socket or the websocket handshake Any cookie headers will be removed for security reasons

localAddressshared SocketAddress localAddress

Return the local address for this socket

readStreamshared ReadStream readStream
remoteAddressshared SocketAddress remoteAddress

Return the remote address for this socket

urishared String uri

Return the URI corresponding to the last request for this socket or the websocket handshake

writeHandlerIDshared String writeHandlerID

When a SockJSSocket is created it automatically registers an event handler with the event bus, the ID of that handler is given by writeHandlerID.

Given this ID, a different event loop can send a buffer to that event handler using the event bus and that buffer will be received by this instance in its own event loop and written to the underlying socket. This allows you to write data to other sockets which are owned by different event loops.

writeStreamshared WriteStream writeStream
Inherited Attributes
Attributes inherited from: Object
hash, string
closeshared void close()

Close it

Inherited Methods
Methods inherited from: Object