Wrap socket so that it can be easily substituted for testing or for using other transport types (e.g. TCP)
[Source]
# File lib/snmp/manager.rb, line 25 def initialize @socket = UDPSocket.open end
# File lib/snmp/manager.rb, line 29 def close @socket.close end
# File lib/snmp/manager.rb, line 37 def recv(max_bytes) @socket.recv(max_bytes) end
# File lib/snmp/manager.rb, line 33 def send(data, host, port) @socket.send(data, 0, host, port) end
[Validate]