# IoT_Communicator_Params

> The eXtremeDB Active Replication Fabric communicator is configured by specifying the parameters described below.

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

> The following structure is initialized by function mco_iot_comm_params_init() and passed to function `mco_iot_comm_create()`:

>         typedef struct mco_iot_comm_params_t_
>          {
>             // The number of callback tasks equal to the maximum number of
>             // connections that the runtime serves in parallel;
>             uint2              n_callback_threads;
>             MCO_SOCK_DOMAIN    sock_domain. // the default  socket domain (TCP or local domain)
>             void              *ssl_params;            // the default SSL parameters
>             timer_unit         send_timeout;      // the default write timeout in milliseconds
>             timer_unit         recv_timeout;       // the  default read timeout in milliseconds
>             int                listen_queue_size;    //-the size of the listen -sockets queue
>             uint2              wakeup_port;
>             int                compression_level;

>          }  mco_iot_comm_params_t;

> The following structure is used to maintain statistics for IoT connections:

>         typedef struct mco_iot_connection_stat_t_
>         {
>             mco_inetaddr_t     inetaddr;                /* peer IP */
>             int                port;                    /* peer port */
>             uint8              sent_bytes;              /* TX bytes */
>             uint8              recv_bytes;              /* RX bytes */
>             uint2              sent_compression_ratio;  /* TX compression ratio in percents */
>             uint2              recv_compression_ratio;  /* RX compression ratio in percents */

>         } mco_iot_connection_stat_t;

> The following structures are used for IoT network communication:

>         typedef struct mco_iot_ack_t_
>         {
>             uint8              seq;  /* This is used internally in the mco_iot_replicator_sync() API function to implement the MCO_IOT_SYNC_WAIT mode. */
>             uint8              sender_agent_id; /* The agent_id of the sender  */
>             uint8              sender_db_id;  /* The database ID of the sender */
>             uint8              receiver_agent_id; /* The agent_id of the receiver */
>             uint8              timestamp;  /* The time of the acknowledgment for 'private' objects (with specified received ID) */
>             uint8              timestamp_cmn;  /* The time of the acknowledgment for 'common' objects (with receiver ID == ALL_AGENTS) */
>             uint4              error_code; /* The error code on the receiver side */
>             uint4              flags; /* Subset of mco_iot_replicator_sync()'s flags parameter  */

>         } mco_iot_ack_t;

>         typedef struct mco_iot_replicator_params_t_
>         {
>             // The size of the connection pool
>             // This is the maximum number of database connections that the replicator is able to hold and reuse
>             uint2      conn_pool_size;
>             // the timeout for mco_iot_replicator_sync() with flag MCO_IOT_SYNC_WAIT
>             timer_unit wait_timeout;

>         } mco_iot_replicator_params_t;