receiveDeserialized

inline suspend fun <T : Any> DefaultClientWebSocketSession.receiveDeserialized(): T

Dequeues a frame and deserializes it to the type T using WebSocket content converter. May throw an exception WebsocketDeserializeException if the converter can't deserialize frame data to type T. May throw WebsocketDeserializeException if the received frame type is not Frame.Text or Frame.Binary. In this case, WebsocketDeserializeException.frame contains the received frame. May throw ClosedReceiveChannelException if a channel was closed

Throws

if no contentConverter is found for the WebSockets plugin

if the received frame can't be deserialized to type T