Represents a client-side WebSocket.

- `Anything`
  - `Object`
    - `Basic` ...and other supertypes
      - `WebSocket` ...and other supertypes

- `WebSocket`
  - `Basic`
    - `Identifiable`
    - `Object`
      - `Anything`
  - `WebSocketBase`
    - `ReadStream`
      - `StreamBase`
    - `WriteStream`
      - `StreamBase`

no subtypes hierarchy

Initializer
`WebSocket(WebSocket unknown)`

Inherited Attributes
Attributes inherited from: `Object` `hash`, `string`

Methods
`binaryHandlerID` | `shared actual default String binaryHandlerID()` When a `Websocket` is created it automatically registers an event handler with the event bus - the ID of that handler is given by this method. Given this ID, a different event loop can send a binary frame 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 connection. This allows you to write data to other WebSockets which are owned by different event loops. Refines `WebSocketBase.binaryHandlerID`
`binaryMessageHandler` | `shared actual default WebSocketBase binaryMessageHandler(Anything(Buffer)? handler)` Set a binary message handler on the connection. This handler serves a similar purpose to handler except that if a message comes into the socket in multiple frames, the data from the frames will be aggregated into a single buffer before calling the handler (using isFinal to find the boundaries). Parameters: `handler` the handler Refines `WebSocketBase.binaryMessageHandler`
`close` | `shared actual default void close()` Close the WebSocket. Refines `WebSocketBase.close`
`closeHandler` | `shared actual default WebSocket closeHandler(Anything()? handler)` Set a close handler. This will be called when the WebSocket is closed. Refines `WebSocketBase.closeHandler`
`drainHandler` | `shared actual default WebSocket drainHandler(Anything()? handler)` Set a drain handler on the stream. If the write queue is full, then the handler will be called when the write queue is ready to accept buffers again. See Pump for an example of this being used. The stream implementation defines when the drain handler, for example it could be when the queue size has been reduced to `maxSize / 2`. Refines `WriteStream.drainHandler`
`end` | `shared actual default void end()` Calls close Refines `WriteStream.end`
`end` | `shared actual default void end(Buffer t)` Same as end but writes some data to the stream before ending. Refines `WebSocketBase.end`
`endHandler` | `shared actual default WebSocket endHandler(Anything()? endHandler)` Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called. Refines `ReadStream.endHandler`
`exceptionHandler` | `shared actual default WebSocket exceptionHandler(Anything(Throwable)? handler)` Set an exception handler. Refines `StreamBase.exceptionHandler`
`frameHandler` | `shared actual default WebSocket frameHandler(Anything(WebSocketFrame)? handler)` Set a frame handler on the connection. This handler will be called when frames are read on the connection. Refines `WebSocketBase.frameHandler`
`handler` | `shared actual default WebSocket handler(Anything(Buffer)? handler)` Set a data handler. As data is read, the handler will be called with the data. Refines `ReadStream.handler`
`isSsl` | `shared actual default Boolean isSsl()` Refines `WebSocketBase.isSsl`
`localAddress` | `shared actual default SocketAddress localAddress()` Refines `WebSocketBase.localAddress`
`pause` | `shared actual default WebSocket pause()` Pause the `ReadSupport`. While it's paused, no data will be sent to the `dataHandler` Refines `ReadStream.pause`
`remoteAddress` | `shared actual default SocketAddress remoteAddress()` Refines `WebSocketBase.remoteAddress`
`resume` | `shared actual default WebSocket resume()` Resume reading. If the `ReadSupport` has been paused, reading will recommence on it. Refines `ReadStream.resume`
`setWriteQueueMaxSize` | `shared actual default WebSocket setWriteQueueMaxSize(Integer maxSize)` Set the maximum size of the write queue to `maxSize`. You will still be able to write to the stream even if there is more than `maxSize` items in the write queue. This is used as an indicator by classes such as `Pump` to provide flow control. The value is defined by the implementation of the stream, e.g in bytes for a NetSocket, the number of Message for a MessageProducer, etc… Refines `WriteStream.setWriteQueueMaxSize`
`textHandlerID` | `shared actual default String textHandlerID()` When a `Websocket` is created it automatically registers an event handler with the eventbus, the ID of that handler is given by `textHandlerID`. Given this ID, a different event loop can send a text frame 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 connection. This allows you to write data to other WebSockets which are owned by different event loops. Refines `WebSocketBase.textHandlerID`
`textMessageHandler` | `shared actual default WebSocketBase textMessageHandler(Anything(String)? handler)` Set a text message handler on the connection. This handler will be called similar to the , but the buffer will be converted to a String first Parameters: `handler` the handler Refines `WebSocketBase.textMessageHandler`
`write` | `shared actual default WebSocket write(Buffer data)` Refines `WebSocketBase.write`
`writeBinaryMessage` | `shared actual default WebSocket writeBinaryMessage(Buffer data)` Writes a (potentially large) piece of binary data to the connection. This data might be written as multiple frames if it exceeds the maximum WebSocket frame size. Refines `WebSocketBase.writeBinaryMessage`
`writeFinalBinaryFrame` | `shared actual default WebSocket writeFinalBinaryFrame(Buffer data)` Write a final WebSocket binary frame to the connection Refines `WebSocketBase.writeFinalBinaryFrame`
`writeFinalTextFrame` | `shared actual default WebSocket writeFinalTextFrame(String text)` Write a final WebSocket text frame to the connection Refines `WebSocketBase.writeFinalTextFrame`
`writeFrame` | `shared actual default WebSocket writeFrame(WebSocketFrame frame)` Write a WebSocket frame to the connection Refines `WebSocketBase.writeFrame`
`writeQueueFull` | `shared actual default Boolean writeQueueFull()` This will return `true` if there are more bytes in the write queue than the value set using setWriteQueueMaxSize Refines `WriteStream.writeQueueFull`
`writeTextMessage` | `shared actual default WebSocket writeTextMessage(String text)` Writes a (potentially large) piece of text data to the connection. This data might be written as multiple frames if it exceeds the maximum WebSocket frame size. Refines `WebSocketBase.writeTextMessage`

Inherited Methods
Methods inherited from: `Object` `equals`
Methods inherited from: `ReadStream<T>` `endHandler()`, `exceptionHandler()`, `handler()`, `pause()`, `resume()`
Methods inherited from: `StreamBase` `exceptionHandler()`
Methods inherited from: `WebSocketBase` `binaryHandlerID()`, `binaryMessageHandler()`, `close()`, `closeHandler()`, `drainHandler()`, `end()`, `endHandler()`, `exceptionHandler()`, `frameHandler()`, `handler()`, `isSsl()`, `localAddress()`, `pause()`, `remoteAddress()`, `resume()`, `setWriteQueueMaxSize()`, `textHandlerID()`, `textMessageHandler()`, `write()`, `writeBinaryMessage()`, `writeFinalBinaryFrame()`, `writeFinalTextFrame()`, `writeFrame()`, `writeQueueFull()`, `writeTextMessage()`
Methods inherited from: `WriteStream<T>` `drainHandler()`, `end()`, `exceptionHandler()`, `setWriteQueueMaxSize()`, `write()`, `writeQueueFull()`