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?
server.add_insecure_port()accepts port as address like "localhost:9000" or "0.0.0.0:9000"add_insecure_portas well?[::]which is I think an alias for0.0.0.0) it will use and @kris comment explains how to do this but the only way you can "specify a host for a server" is when you decide on which host you're going to deploy code (e.g. your server).