|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vertx.groovy.core.http.WebSocket
org.vertx.groovy.core.http.ServerWebSocket
class ServerWebSocket extends WebSocket
Represents a server side WebSocket that is passed into a the websocketHandler of an HttpServer
Instances of this class are not thread-safe
Constructor Summary | |
protected ServerWebSocket(JServerWebSocket jSWS)
|
Method Summary | |
---|---|
java.lang.String
|
getPath()
@return The path the websocket is attempting to connect at |
void
|
reject()
Reject the WebSocket |
Methods inherited from class WebSocket | |
---|---|
close, closedHandler, dataHandler, drainHandler, endHandler, exceptionHandler, getBinaryHandlerID, getTextHandlerID, isWriteQueueFull, leftShift, leftShift, pause, resume, setWriteQueueMaxSize, writeBinaryFrame, writeBuffer, writeTextFrame |
Constructor Detail |
---|
protected ServerWebSocket(JServerWebSocket jSWS)
Method Detail |
---|
java.lang.String getPath()
void reject()
Calling this method from the websocketHandler gives you the opportunity to reject the websocket, which will cause the websocket handshake to fail by returning a 404 response code.
You might use this method, if for example you only want to accept websockets with a particular path.
Groovy Documentation