Using 0.0.0.0 as server listen address

368 views
Skip to first unread message

Sumukh Shivaprakash

unread,
Aug 27, 2021, 3:44:50 PM8/27/21
to grpc.io
After creating a server and adding a listen port with "0.0.0.0:1111", is it possible to figure out which interface grpc picked to bind and query that ?

This is similar to using port 0 and then querying the port number that was dynamically assigned, except for the IP address.

Yuri Golobokov

unread,
Sep 1, 2021, 1:39:11 PM9/1/21
to grpc.io
Hi,

Which language are you using for gRPC server?

yas...@google.com

unread,
Sep 8, 2021, 1:09:36 PM9/8/21
to grpc.io
For C++, the bound port is available in the `selected_port` parameter of the `AddListeningPort` API.
Reply all
Reply to author
Forward
0 new messages