@groovy.transform.CompileStatic class SockJSSocket extends java.lang.Object
You interact with SockJS clients through instances of SockJS socket.
The API is very similar to WebSocket. It implements both and so it can be used with Pump to pump data with flow control.
Constructor and description |
---|
SockJSSocket
(java.lang.Object delegate) |
Type | Name and description |
---|---|
void |
close() Close it |
SockJSSocket |
drainHandler(io.vertx.core.Handler<java.lang.Void> handler) |
void |
end(Buffer t) |
void |
end() Call SockJSSocket.end. |
SockJSSocket |
endHandler(io.vertx.core.Handler<java.lang.Void> endHandler) |
SockJSSocket |
exceptionHandler(io.vertx.core.Handler<java.lang.Throwable> handler) |
java.lang.Object |
getDelegate() |
SockJSSocket |
handler(io.vertx.core.Handler<Buffer> handler) |
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 @return |
SocketAddress |
localAddress() Return the local address for this socket @return |
SockJSSocket |
pause() |
SocketAddress |
remoteAddress() Return the remote address for this socket @return |
SockJSSocket |
resume() |
SockJSSocket |
setWriteQueueMaxSize(int maxSize) |
java.lang.String |
uri() Return the URI corresponding to the last request for this socket or the websocket handshake @return |
Session |
webSession() @return
|
User |
webUser() @return
|
SockJSSocket |
write(Buffer data) |
java.lang.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 . |
boolean |
writeQueueFull() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Close it
Call SockJSSocket.end.
Return the headers corresponding to the last request for this socket or the websocket handshake Any cookie headers will be removed for security reasons
Return the local address for this socket
Return the remote address for this socket
Return the URI corresponding to the last request for this socket or the websocket handshake
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.