0

AllJoyn Version: Thin core 16.04 aj\allseen\core\ajtcl\test\doorsvc.cc

I try to study the security flow for doorsvc example code. … AJ_SetIdleTimeouts(&bus, 10, 4);

What is the purpose to use “AJ_SetIdleTimeouts(&bus, 10, 4);”? And any detail information about AJ_SetIdleTimeouts?

Thank you very much

Frank Lin
  • 1
  • 1

1 Answers1

0

AJ_SetIdleTimeouts() is a method defined at the aj_link_timeout.h file. The purpose of the method is to adjust the idle-timeout value between the routing node and the thin client. In AJ Thin Core Library, Thin Clients connect a standard client (AKA routing node) and use that client as routing their messages. During this connection, routing node send ping messages to the thin clients in order to make sure that they are up&running.

You can find the method declaration at the below:

/**
 * Set the idle timeouts from the Routing node to the TCL.
 *
 * @param bus        The bus attachment to which the app is connected to
 * @param idleTo     Requested Idle Timeout for the link. i.e. time after which the Routing node
 *                   must send a DBus ping to Leaf node in case of inactivity.
 *                   Use 0 to leave unchanged.
 * @param probeTo    Requested Probe timeout. The time from the Routing node sending the DBus
 *                   ping to the expected response.
 *                   Use 0 to leave unchanged.
 * @return  Return AJ_Status
 *         - AJ_OK if the request was sent
 *         - An error status otherwise
 */
AJ_EXPORT
AJ_Status AJ_SetIdleTimeouts(AJ_BusAttachment* bus, uint32_t idleTo, uint32_t probeTo);
Aksel Fatih
  • 1,419
  • 18
  • 31