new SockJSSocket()
You interact with SockJS clients through instances of SockJS socket.
- Source:
Methods
-
close()
-
Close it
- Source:
-
drainHandler(handler) → {SockJSSocket}
-
Parameters:
Name Type Description handler
function - Source:
Returns:
- Type
- SockJSSocket
-
endHandler(endHandler) → {SockJSSocket}
-
Parameters:
Name Type Description endHandler
function - Source:
Returns:
- Type
- SockJSSocket
-
exceptionHandler(handler) → {SockJSSocket}
-
Parameters:
Name Type Description handler
function - Source:
Returns:
- Type
- SockJSSocket
-
handler(handler) → {SockJSSocket}
-
Parameters:
Name Type Description handler
function - Source:
Returns:
- Type
- SockJSSocket
-
headers() → {MultiMap}
-
Return the headers corresponding to the last request for this socket or the websocket handshake Any cookie headers will be removed for security reasons
- Source:
Returns:
- Type
- MultiMap
-
localAddress() → {SocketAddress}
-
Return the local address for this socket
- Source:
Returns:
- Type
- SocketAddress
-
pause() → {SockJSSocket}
-
- Source:
Returns:
- Type
- SockJSSocket
-
remoteAddress() → {SocketAddress}
-
Return the remote address for this socket
- Source:
Returns:
- Type
- SocketAddress
-
resume() → {SockJSSocket}
-
- Source:
Returns:
- Type
- SockJSSocket
-
setWriteQueueMaxSize(maxSize) → {SockJSSocket}
-
Parameters:
Name Type Description maxSize
number - Source:
Returns:
- Type
- SockJSSocket
-
uri() → {string}
-
Return the URI corresponding to the last request for this socket or the websocket handshake
- Source:
Returns:
- Type
- string
-
webSession() → {Session}
-
- Source:
Returns:
-
the Vert.x-Web session corresponding to this socket
-
- Type
- Session
-
webUser() → {User}
-
- Source:
Returns:
-
the Vert.x-Web user corresponding to this socket
-
- Type
- User
-
write(data) → {SockJSSocket}
-
Parameters:
Name Type Description data
Buffer - Source:
Returns:
- Type
- SockJSSocket
-
writeHandlerID() → {string}
-
When a
SockJSSocket
is created it automatically registers an event handler with the event bus, the ID of that handler is given bywriteHandlerID
.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.
- Source:
Returns:
- Type
- string
-
writeQueueFull() → {boolean}
-
- Source:
Returns:
- Type
- boolean