Object
Wrap socket so that it can be easily substituted for testing or for using other transport types (e.g. TCP)
# File lib/snmp/manager.rb, line 27 def initialize(address_family) @socket = UDPSocket.open(address_family) end
# File lib/snmp/manager.rb, line 31 def close @socket.close end
# File lib/snmp/manager.rb, line 39 def recv(max_bytes) @socket.recv(max_bytes) end
# File lib/snmp/manager.rb, line 35 def send(data, host, port) @socket.send(data, 0, host, port) end
[Validate]
Generated with the Darkfish Rdoc Generator 2.