Method Geography.GeoIP.IPv4()->create()
- Method
create
Geography.GeoIP.IPv4 Geography.GeoIP.IPv4(
string
file_name
,function
(string
,ADT.CritBit.IPv4Tree
:void
)fun
)
Geography.GeoIP.IPv4 Geography.GeoIP.IPv4(
ADT.CritBit.IPv4Tree
tree
)- Description
Objects of this class can either be created from a file
file_name
with an optional parsing functionfun
. Whenfun
is omitted, it defaults to Geography.GeoIP.parse_maxmind.fun
will be called for each line infile_name
and the critbit tree to add the entry to.Alternatively, an instance of ADT.CritBit.IPv4Tree can be passed.
tree
is expected to map the first address of each range to its geographical location.