Relative Content

Tag Archive for c++linuxgrpc

gRPC C++: bind connection socket to a given source address

I’m using gRPC C/C++ library (v1.62.1) to build a grpc client on Linux (Ubuntu 22.04). On the running machine I have several network interfaces and I need to bind different connection sockets to different interfaces (bind to a give source ip address, port is not important). I need a solution where the client controls interfaces used for different connections so I can’t just configure iptables on the machine.