Can I manually specify a host for a gRPC server using Python?

Viewed 22

I'm developing a gRPC application using Python and the basic grpc library as well as proto. In my client I can easily specify a port and host when creating a channel, but when creating a server like so server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) I can't find any way to specify a host. I can add ports to the server via server.add_insecure_port(port info)but am totally stumped on specifying a host. I've combed through the documentation here and here, and have looked through any relevant queries elsewhere, but I can't find a solution. The closest I can find is this asyncio/grpclib library that has this functionality, but I don't want to use this as the gRPC library seems perfect for my use case. Is there any way I can pass in a host?

0 Answers
Related