subscribeAndConsumeBlocking
fun subscribeAndConsumeBlocking(messageConsumer: (ClientMessageWrapper) -> Unit)
Content copied to clipboard
Subscribes to incoming messages and consumes them on the thread that called this function. This will open a dedicated, persistent socket connection for this function call. The current thread will be blocked when it waits for more messages. After this function executes, an unsubscribe request will be made and the persistent socket will be closed.
Throws
if the subscribe request fails
if an I/O error occurs when communicating to the socket