The IoTConnection class is a wrapper for
mco_iot_connection_h
and is not intended to be created directly in programs. It is passed as an argument to event handlers for the purpose of getting extended connection information.
release() Release the connection disconnect() Drop the connection Properties: address The connection address agent_id The connection agent_id
stat A dictionary with connection statistics in the following keys:
"address" A string containing the address "port" The connection port (integer) "sent_bytes" The number of bytes sent (long) "recv_bytes" The number of bytes received (long) error A dictionary with the last error information about last error in the following keys:
"stop_reason" A string containing the reason for stopping connection. Possible values are "NONE", "NETWORK_ERROR", "CALLBACK_FAILED", "IOT_STOPPED", "USER_REQUEST", "UNKNOWN" "last_error" ... (integer) "last_errno" The errno
value (integer)"errmsg" A string containing the error message text comm The IoTCommunicator instance associated with this connection