Class: I2pIpData

Inherits:
BinData::BasePrimitive
  • Object
show all
Defined in:
lib/ip2proxy_ruby/i2p_ip_data.rb

Instance Method Summary collapse

Instance Method Details

#read_and_return_value(io) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/ip2proxy_ruby/i2p_ip_data.rb', line 2

def read_and_return_value(io)
  iv = eval_parameter(:ip_version)
  if iv == 4
    addr = BinData::Uint32le.read(io)
  elsif iv == 6
    addr = BinData::Uint128le.read(io)
  end
end