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

Yulia Kozarevska yko at mita-teknik.com
Tue May 12 11:09:49 CEST 2009


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




More information about the SNMP4J mailing list