mco_iot_conn_get_comm

Return the communicator the current connection belongs to.

For an overview see page ARF Applications in C

Prototype

 
    mco_iot_comm_h  mco_iot_conn_get_comm(const iot_connection_h iotc);
 

Arguments

iotc The connection handle (iot_connection_h)

Description

This function returns the communicator the current connection belongs to.

Return Codes

mco_iot_comm_h The communicator this connection belongs to

Example

     
    // onConnect callback
    int iot_on_connect(mco_iot_connection_h iotc, void *context)
    {
        mco_iot_comm_h comm = mco_iot_conn_get_comm(iotc);
        // Use the communicator comm
        ...
        return IOT_CALLBACK_OK;
    }
     

Files

Header file:
mcoiot.h
Source file:
mcoiotcomm.c
Library:
libmcoiotcomm.a