# mco_iot_conn_get_address

Return the connection address.

### For an overview see page ARF Applications in C

### Prototype

        const char   * mco_iot_conn_get_address(iot_connection_h iotc);

### Arguments

iotc | The connection handle (`iot_connection_h`)

### Description

This function returns the connection address through the connection handle (for connect-sockets).

### Return Codes

const char * | The string connection address parameter if the connection was created by `mco_iot_comm_connect_async()` or `mco_iot_replicator_connect()`; otherwise NULL

### Example

        {
            ...
            // Print the peer address for agent_id:
            mco_iot_connection_h conn = mco_iot_comm_find_conn(comm, agent_id);
            printf("Address : %s\n", mco_iot_conn_get_address(conn));
            mco_iot_conn_release(conn);
            ...
        }

### Files

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