WebSocketListenerFlowAdapter
Adapter between listener calls and a web socket "incoming" frames flow. This is to make it easier to bridge listener-based APIs with the flow-based API of Krossbow. Methods of this listener never fail, but can send failure through the frames channel to the consumers.
Note: this class is not thread-safe. The callbacks must not be called concurrently.
Constructors
Properties
Functions
Callback for binary messages (potentially partial frames).
Sends a WebSocketFrame.Close to the incomingFrames flow, and completes it normally.
Fails the incomingFrames flow with a WebSocketException with the given message.
Fails the incomingFrames flow with a WebSocketException with the given error as cause.
Sends a WebSocketFrame.Ping frame with the given bytes to the incomingFrames flow.
Sends a WebSocketFrame.Pong frame with the given bytes to the incomingFrames flow.
Callback for text messages (potentially partial frames).