简体   繁体   English

Python GRPC 客户端到具有不同 IP 地址的远程服务器

[英]Python GRPC Client to remote server with different IP address

Is it possible to connect GPRC client in Python or any language to a remote server using DNS or an actual IP address?.是否可以使用 DNS 或实际的 IP 地址将 Python 或任何语言的 GPRC 客户端连接到远程服务器? If you can provide a code snippet that would be great.如果你能提供一个代码片段那就太好了。

Yes, see this example .是的,请看这个 例子

You would replace localhost:50051 with the remote server's fully-qualified domain name (or IP address) and port.您可以将localhost:50051替换为远程服务器的完全限定域名(或 IP 地址)和端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM