Method: Rex::Socket#initsock

Defined in:
lib/rex/socket.rb

#initsock(params = nil) ⇒ Object

Initialize general socket parameters.



699
700
701
702
703
704
705
706
707
708
# File 'lib/rex/socket.rb', line 699

def initsock(params = nil)
  if (params)
    self.peerhost  = params.peerhost
    self.peerport  = params.peerport
    self.localhost = params.localhost
    self.localport = params.localport
    self.context   = params.context || {}
    self.ipv       = params.v6 ? 6 : 4
  end
end