Copyright © 2006 Bob Ippolito
Behaviours: gen_server.
Authors: Bob Ippolito (bob@redivi.com).
geoip_atom() = country_code | country_code3 | country_name | region | city | postal_code | latitude | longitude | area_code | dma_code
geoip_field() = geoip_atom | [geoip_atom()]
address_fast/3 | |
bench/0 | |
bench/1 | |
code_change/3 | gen_server callback. |
filename/0 | Get the database filename currently being used by the server. |
get/2 | Get a field from the geoip record returned by lookup. |
handle_call/3 | gen_server callback. |
handle_cast/2 | gen_server callback. |
handle_info/2 | gen_server callback. |
init/1 | initialize the server with the database at Path. |
ip2long/1 | Convert an IP address from a string, IPv4 tuple or IPv6 tuple to the big endian integer representation. |
lookup/1 | Get a geoip() record for the given address. |
lookup/2 | Lookup a geoip record for Addr using the database D. |
lookup_pl/1 | Get a proplist version of a geoip() record for the given address. |
new/0 | Create a new geoipdb database record using the default priv/GeoLiteCity.dat.gz database. |
new/1 | Create a new geoipdb database record using the database at Path. |
record_fields/0 | Get an ordered list of the geoip record fields. |
reload/0 | Reload the existing database in this process and then change the state of the running server. |
reload/1 | Load the database at Path in this process and then change the state of the running server with the new database. |
start/0 | Start the egeoip application with the default database. |
start/1 | Start the egeoip application with the File as database. |
start_link/1 | Start the server using the default priv/GeoLitecity.dat.gz database. |
start_link/2 | Start the server using the database at Path registered as Name. |
stop/0 | Stop the server. |
terminate/2 | gen_server callback. |
address_fast(Rest, Num, Shift) -> any()
bench() -> any()
bench(Count) -> any()
code_change(OldVsn, State, Extra) -> {ok, NewState}
gen_server callback.
filename() -> string()
Get the database filename currently being used by the server.
get(R::geoip(), Field::geoip_field()) -> term()
Get a field from the geoip record returned by lookup.
handle_call(What::Msg, From, State) -> term()
gen_server callback.
handle_cast(What::Msg, State) -> term()
gen_server callback.
handle_info(Info, State) -> {noreply, State}
gen_server callback.
init(FileName::Path) -> {ok, State}
initialize the server with the database at Path.
ip2long(Address) -> {ok, integer()}
Convert an IP address from a string, IPv4 tuple or IPv6 tuple to the big endian integer representation.
lookup(Address) -> geoip()
Get a geoip() record for the given address. Fields can be obtained from the record using get/2.
Lookup a geoip record for Addr using the database D.
lookup_pl(Address) -> geoip()
Get a proplist version of a geoip() record for the given address.
new() -> {ok, geoipdb()}
Create a new geoipdb database record using the default priv/GeoLiteCity.dat.gz database.
new(Path) -> {ok, geoipdb()}
Create a new geoipdb database record using the database at Path.
record_fields() -> Fields::list()
Get an ordered list of the geoip record fields
reload() -> ok
Reload the existing database in this process and then change the state of the running server.
reload(FileName::Path) -> ok
Load the database at Path in this process and then change the state of the running server with the new database.
start() -> ok
Start the egeoip application with the default database.
start(File) -> ok
Start the egeoip application with the File as database.
start_link(Name) -> {ok, Pid}
Start the server using the default priv/GeoLitecity.dat.gz database. The process will be registered as Name
start_link(Name, FileName::Path) -> {ok, Pid}
Start the server using the database at Path registered as Name.
stop() -> ok
Stop the server.
terminate(Reason, State) -> ok
gen_server callback.
Generated by EDoc, Feb 12 2016, 16:21:25.