[SNMP4J] how to create TCP transport on the preexisting socket?

Frank Fock fock at agentpp.com
Tue May 12 21:23:27 CEST 2009


Yulia,

With the current 1.10, you will have to implement your own
TcpTransportMapping. I will provide hooks (Factory interface)
for the next release to allow socket injection.

Best regards,
Frank


Yulia Kozarevska wrote:
> Dear all,
> I'm trying to implement snmp protocol support for a complex client-server application using snmp4j. I need to create a transport on pre-existing socket. Concerning DefaultUdpTransportMapping class it seems to be easy. I create a new XXXUdpTransportMapping extending DefaultUdpTransportMapping and define a different constructor, creating the socket in a required way:
> socket = new XXXSocketFactory().createDatagramSocket(udpAddress.getInetAddress()
>         , udpAddress.getPort());
> 
> But how to make XXXTcpTransportMapping extending DefaultTcpTransportMapping to behave similarly (work on already existing socket)?
> Thank you very much in advance.
> Best regards,
> Julia
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list