Function anjay_transport_set_online

Function Documentation

int anjay_transport_set_online(anjay_t *anjay, anjay_transport_set_t transport_set)

Puts all the transports that are enabled through the compile-time and runtime configuration, and specified in transport_set, into online mode. At the same time, puts all the other transports into offline mode.

This function combines the functionality of anjay_transport_enter_offline and anjay_transport_exit_offline into a single function. See their documentation for details about the semantics of online and offline modes.

Parameters:
  • anjay – Anjay object to operate on.

  • transport_set – Set of transports to put into online mode.

Returns:

0 on success, a negative value in case of error.