0
当使用MS SNMP Mgmt Api在超时和重试方面我注意到一些奇怪的snmp通信行为。我想知道Win Server 2008 R1 x64是否支持mgmt api。我的程序是一个C++ 64位snmp扩展代理,它也使用mgmt api与其他代理进行通信。Windows Snmp管理Api - Snmp超时/重试似乎不起作用
这是我的伪代码:
SnmpMgrOpen(ip address, 150ms timeout, 3 retries)
start = getTickCount()
result = SnmpMgrRequest(get request with 3 or 4 OIDs)
finish = getTickCount()
if (result == some error)
{
log Error including total time (i.e finish - start ticks)
}
SnmpMgrClose()
当snmpMgrRequest调用超时,总时间从1014ms随时随地等于5000毫秒。如果我将重试次数设置为0,则总时间仍然是1014ms到5000ms。
我认为,重试为0,SnmpMgrRequest将在150ms内超时。文档似乎暗示了这一点。我是否缺少至少一秒的最小超时时间?什么可能导致这种行为?
任何帮助将不胜感激。我在这里迷路了。