CheckIfHasInternetConnection
fun EventSchemaBuilderScope.CheckIfHasInternetConnection(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {})
Asks the client's network layer whether the device currently has an internet connection, and branches on the answer, on the IO dispatcher. Does not consume incomingData. Dispatches onStart before the check runs; onSuccess (no data) when there is a connection; onFailure (no data) when there is none.
Parameters
id
Unique identifier of this event. Defaults to a random id.
trigger
Trigger that fires this event, built via EventTriggers.
events
Child events chained after this one, wired to its triggers (onStart, onSuccess, onFailure).