public interface SockJSSocket extends ReadStream<SockJSSocket>, WriteStream<SockJSSocket>
The API is very similar to WebSocket.
It implements 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.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close it
|
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. |
dataHandler, endHandler, pause, resumedrainHandler, setWriteQueueMaxSize, write, writeQueueFullexceptionHandlerjava.lang.String writeHandlerID()
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.
void close()