My understanding is that you register the service with a host string to 
match a client using the corresponding authority
for example

registerService("", service)

and the client to use

and then makes the rpc.

At the server side, grpc library will first try to find an exact match of 
the :authority header on the wire with the registered services. If it 
cannot find any it will try to just look for the method name with the 
registered services.

On Tuesday, March 20, 2018 at 8:08:34 PM UTC-7, wrote:
> Hello, 
> I'm looking to register multiple services to the same (sync) server in 
> C++, ideally specifying a different IP / port for each.
> The ServerBuilder documentation suggests that I'm able to specify a host 
> along with the service I'm registering to the server, a la
> builder.registerService(host_string, &service)
> However, when I provide a host string in the format "[ip]:[port]" (or a 
> more concrete ex; ``), no clients are able to successfully 
> make RPCs to the server, calls which would otherwise work if I simply 
> registered to the default host using registerService([service addr]). 
> Providing an IP without port and vice versa don't work either. The 
> documentation doesn't elaborate on the format the function expects for the 
> function param std::string host. What should I be providing here?
> Cheers, 
> Antonia

You received this message because you are subscribed to the Google Groups 
"" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

Reply via email to