listenUnreadMessages

open suspend override fun listenUnreadMessages(serviceEndpointUri: String, onMessageCallback: OnMessageCallback)(source)

Listens for unread messages from a specified WebSocket service endpoint.

This function creates a WebSocket connection to the provided service endpoint URI and listens for incoming messages. Upon receiving messages, it processes and dispatches them to the specified callback function.

Parameters

serviceEndpointUri

The URI of the service endpoint. It should be a valid WebSocket URI.

onMessageCallback

A callback function that is invoked when a message is received. This function is responsible for handling the incoming message.