|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vertx.groovy.core.sockjs.SockJSSocket
abstract class SockJSSocket
You interact with SockJS clients through instances of SockJS socket.
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.
Constructor Summary | |
protected SockJSSocket(SockJSSocket jSocket)
|
Method Summary | |
---|---|
void
|
close()
Close the socket |
java.lang.String
|
getWriteHandlerID()
When a SockJSSocket is created it automatically registers an event handler with the event bus, the ID of that handler is given by writeHandlerID. |
SockJSSocket
|
leftShift(Buffer buff)
Write a Buffer to the socket |
SockJSSocket
|
leftShift(java.lang.String str)
Write a String to the socket |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Constructor Detail |
---|
protected SockJSSocket(SockJSSocket jSocket)
Method Detail |
---|
void close()
java.lang.String getWriteHandlerID()
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.
SockJSSocket leftShift(Buffer buff)
SockJSSocket leftShift(java.lang.String str)
Groovy Documentation