phoenix-channel / ch.kuon.phoenix / Channel / Push / receive

receive

fun receive(status: String, callback: (JSONObject) -> Unit): Push

Register a callback when a message with the following status is returned.

Note: the callback might be called from another thread.

Parameters

status - The status to register the callback for

callback - A callback called with the response

Return
Self for method chaining