AllJoyn版本:Thin core 16.04 AJ \ allseen \芯\ ajtcl \测试\ doorsvc.cc
我尝试研究doorvc示例代码的安全流程。 ... AJ_SetIdleTimeouts(& bus,10,4);
使用“AJ_SetIdleTimeouts(& bus,10,4);”的目的是什么? 以及有关AJ_SetIdleTimeouts的任何详细信息?
非常感谢
答案 0 :(得分:0)
AJ_SetIdleTimeouts()
是aj_link_timeout.h文件中定义的方法。该方法的目的是调整路由节点和瘦客户端之间的空闲超时值。在AJ Thin Core Library中,瘦客户端连接标准客户端(AKA路由节点)并使用该客户端路由其消息。在此连接期间,路由节点将ping消息发送到瘦客户端,以确保它们已启动并运行。
您可以在下面找到方法声明:
/**
* 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);