class Sloth::Snmp::UDPTransportExt
Public Class Methods
new( address_family, bindto: nil, device: nil )
click to toggle source
Calls superclass method
# File lib/sloth/snmp/impl.rb, line 9 def initialize( address_family, bindto: nil, device: nil ) super address_family if bindto host, port = bindto.split(':') rescue nil @socket.bind( host, port.to_i ) end if device @socket.setsockopt( Socket::SOL_SOCKET, Socket::SO_BINDTODEVICE, device ) end end