[SNMP4J] automatic reconnect snmp agent

Frank Fock fock at agentpp.com
Wed Aug 8 16:06:44 CEST 2012


Hi,
UDP is not a connection oriented transport. So there cannot be something like a reconnect. May be you can further explain what you are trying to accomplish? Especially what you mean with "connection loss"?

Best regards
Frank



Am 08.08.2012 um 11:58 schrieb Василий <basvas at mail.ru>:

> Hello, i deploy snmp applocation snmp agent
> and i want that connect is lost my application automatic reconnect to host
> 
> i tired 
> TransportMapping transport = new DefaultUdpTransportMapping();
> 
> while (true)
> if (transport.isListening() == false) 
> { int i=0;
>  System.out.println("Error connection.. \t"+ i++ );
> Thread.sleep(500);
> snmp = new Snmp(transport);
> 
> transport.listen();
> }
> 
> 
> but dont work
> 
> Did you know about event connection or any kind for my idea?
> 
> ps
> target.setRetries(0) and  target.setTimeout(0);
> dont  to offer
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j



More information about the SNMP4J mailing list