A stream for HttpClient WebSocket connection.
When the connection attempt is successful, the stream handler is called back with the WebSocket argument, immediately followed by a call to the end handler. When the connection attempt fails, the exception handler is invoked.
The connection occurs when the handler method is called with a non null handler, the other handlers should be set before setting the handler.
AnythingWebSocketStreamBasicIdentifiableObjectAnythingno subtypes hierarchy
| Initializer |
WebSocketStream(WebSocketStream unknown) |
| Inherited Attributes |
Attributes inherited from: Objecthash, string |
| Methods | |
endHandler | shared actual default WebSocketStream 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 WebSocketStream exceptionHandler(Anything(Throwable)? handler)Set an exception handler. Refines StreamBase.exceptionHandler |
handler | shared actual default WebSocketStream handler(Anything(WebSocket)? handler)Set a data handler. As data is read, the handler will be called with the data. Refines ReadStream.handler |
pause | shared actual default WebSocketStream pause()Pause the Refines ReadStream.pause |
resume | shared actual default WebSocketStream resume()Resume reading. If the Refines ReadStream.resume |
| Inherited Methods |
Methods inherited from: Objectequals |
Methods inherited from: ReadStream<T> |
Methods inherited from: StreamBase |