/geoip-api-csharp2

GeoIP C# API version 2

Primary LanguageC#

GeoIP C# API 1.17
================

As of version 1.14 this API is thread safe.

Instructions for Mono - see http://www.mono-project.com/
Should also work in Windows C# environment.

To compile the examples

For country example
mono /usr/local/bin/mcs.exe countryExample.cs Country.cs DatabaseInfo.cs Location.cs LookupService.cs Region.cs RegionName.cs

For city example
mono /usr/local/bin/mcs.exe cityExample.cs Country.cs DatabaseInfo.cs Location.cs LookupService.cs Region.cs RegionName.cs

For countryV6 example
mono /usr/local/bin/mcs.exe countryV6Example.cs Country.cs DatabaseInfo.cs Location.cs LookupService.cs Region.cs RegionName.cs

For cityV6 example
mono /usr/local/bin/mcs.exe cityV6Example.cs Country.cs DatabaseInfo.cs Location.cs LookupService.cs Region.cs RegionName.cs

For region example
mono /usr/local/bin/mcs.exe regionExample.cs Country.cs DatabaseInfo.cs Location.cs LookupService.cs Region.cs RegionName.cs

For org example
mono /usr/local/bin/mcs.exe orgExample.cs Country.cs DatabaseInfo.cs Location.cs LookupService.cs Region.cs RegionName.cs

For domain example
mono /usr/local/bin/mcs.exe domainExample.cs Country.cs DatabaseInfo.cs Location.cs LookupService.cs Region.cs RegionName.cs

To run the examples:

for country example
mono countryExample.exe

for city example
mono cityExample.exe 24.24.24.24

for org example
mono orgExample.exe

for domain example
mono domainExample.exe

for asn example
mono asnExample.exe

for countryV6 example
mono countryV6Example.exe

for city example
mono cityV6Example.exe ::24.24.24.24

for asnV6 example
mono asnV6Example.exe

MEMORY CACHING

There are two options available:

GEOIP_STANDARD - read database from filesystem, uses least memory.

GEOIP_MEMORY_CACHE - load database into memory, faster performance
        but uses more memory

Copyright 2011 MaxMind Inc
Licensed under the LGPL