grpc serverport.pickunused-客户端如何连接?
建立GRPC的服务器端时,您可以指定它自动为您选择未使用的端口。但是,如果您使用此功能,那么客户将如何知道该端口的连接,因为它是动态的?
在我的特殊情况下,我将使用本地IPC,尽管我认为这个问题也可能与远程IPC有关。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
他们必须被告知。
pickunused
是保存服务器(开发人员)确定可用端口的便利。它不会更改或简化客户端的端口确定。客户需要了解远程主机地址(如果有)和套接字/端口,才能连接到服务器。
可以查找主机地址(例如DNS),并且插座发现的唯一解决方案是:
pickunused
)1 - 也许是使用
pickunused
They must be told.
PickUnused
is a convenience to save the server (developer) determining an available port. It does not change nor simplify the client's port determination.Clients need to know a remote host address (if any) and a socket/port in order to connect to a server.
Host addresses can be looked up (e.g. DNS) and the only solutions for the socket's discovery are:
PickUnused
)1 -- Perhaps another gRPC service using
PickUnused
???? Turtles, all the way down!