Represents a server side WebSocket that is passed into a the websocketHandler of an HttpServer

Instances of this class are not thread-safe

no subtypes hierarchy

Initializer
ServerWebSocket(ServerWebSocket delegate)
Attributes
headersshared MultiMap headers

A map of all headers in the request to upgrade to websocket

pathshared String path= delegate.path()

The path the websocket is attempting to connect at

queryshared String? query

The query string passed on the websocket uri

urishared String uri= delegate.uri()

The uri the websocket handshake occurred at

Inherited Attributes
Attributes inherited from: Object
hash, string
Attributes inherited from: WebSocketBase
Methods
rejectshared ServerWebSocket reject()

Reject the WebSocket

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.

Inherited Methods
Methods inherited from: Object
equals
Methods inherited from: WebSocketBase