public IpGeoServer() { _server = new Grpc.Core.Server { Services = { IpLocator.BindService(this) }, Ports = { new ServerPort("localhost", Constants.Port, ServerCredentials.Insecure) } }; }
public static IPModel GetIP(string ip) { IPModel model = null; string fileName = HttpContext.Current.Server.MapPath("~/App_Data/CoralWry.dat"); var slt = IpLocator.GetIpLocation(fileName, ip); model = new IPModel() { ip = ip, country = slt.Country, city = slt.City, start = IpLocator.IntToIpString(slt.IpStart), end = IpLocator.IntToIpString(slt.IpEnd) }; return(model); }