Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (27 sloc) 883 Bytes
using Grpc.Core;
using GrpcGeo.Domain;
using IpGeo;
using System;
using System.Net;
namespace GrpcGeo.Client
internal class Program
private static void Main(string[] args)
Channel channel = new Channel($"{Constants.Port}", ChannelCredentials.Insecure);
var client = new IpLocator.IpLocatorClient(channel);
var request = new LocationRequest
App = "dotnet core",
Ip = new WebClient().DownloadString("").Replace("\n", "")
var reply = client.Find(request);
Console.WriteLine($"The IP '{request.Ip}' comes from {reply.City} in {reply.Country}.");
Console.WriteLine($"Press any key to exit...");
You can’t perform that action at this time.