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_namewith an optional parsing functionfun. Whenfunis omitted, it defaults to Geography.GeoIP.parse_maxmind.funwill be called for each line infile_nameand the critbit tree to add the entry to.Alternatively, an instance of ADT.CritBit.IPv4Tree can be passed.
treeis expected to map the first address of each range to its geographical location.