bool mutate_fd_callback(const grpc_mutate_socket_info* info,
grpc_socket_mutator* mutator) {
int ret = 0;
struct sockaddr_in addr;
memset(&addr, '\0', sizeof(addr));
addr.sin_addr.s_addr = inet_addr("20.0.0.1");
addr.sin_port = htons(51234);
addr.sin_family = AF_INET;
ret = ::bind(info->fd, (struct sockaddr *)&addr, sizeof(struct sockaddr));
bool mutate_fd_callback(const grpc_mutate_socket_info* info,
grpc_socket_mutator* mutator) {
int ret = 0;
struct sockaddr_in6 addr;
memset(&addr, '\0', sizeof(addr));
addr.sin6_family = AF_INET6;
addr.sin6_port = htons(51234);
std::string src = "::ffff:20.0.0.1";
inet_pton(AF_INET6, src.c_str(), &addr.sin6_addr);
ret = bind(info->fd, (struct sockaddr *)&addr, sizeof(addr));
Regards,
Sachin
--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/3c8c001a-e278-4c59-aeac-d07f8f51b286n%40googlegroups.com.