Method: Rubius::Authenticator#initialize
- Defined in:
- lib/rubius/authenticator.rb
#initialize ⇒ Authenticator
Returns a new instance of Authenticator.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rubius/authenticator.rb', line 9 def initialize @dictionary = Rubius::Dictionary.new @packet = nil @secret = nil @host = nil @port ||= Socket.getservbyname("radius", "udp") @port ||= 1812 @timeout = 10 @sock = nil @nas_ip = UDPSocket.open {|s| s.connect(@host, 1); s.addr.last } @identifier = Process.pid && 0xff end |