gRPC C++ doesn't have a way of doing that. It looks like the way processes 
switch network namespaces is by using `ip netns exec` but that's not what 
we want.

On Tuesday, March 28, 2023 at 4:11:10 AM UTC-7 Dylan Walsh wrote:

> Hey all,
>
> I was wondering if a single c++ gRPC server has the ability to bind to 
> different addresses within different network namespaces:
>
> e.g localhost:4566 in network namespace *default*
>        localhost:4567 in network namespace *red*
>
> Currently, I can switch namespace (setns) before calling BuildAndStart() 
> for a ServerBuilder object. But this causes all configured listening ports 
> to bind within the same namespace. 
>
> I was curious if there is any existing functionality for allowing calls to 
> AddListeningPort(..) to specify the network namespace to use (or some other 
> way of achieving this).
>
> Kind Regards,
> Dylan
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/f278a4f4-c411-4009-9bc8-343395d3deean%40googlegroups.com.

Reply via email to