gpt4 book ai didi

ios - 在 iOS 上运行 gRPC 服务器

转载 作者:行者123 更新时间:2023-12-02 08:08:16 28 4
gpt4 key购买 nike

是否可以在 iOS 上运行 gRPC 服务器?

假设我们想要使用 gRPC 框架来定义 API 等。现在我们想要在与使用它的应用程序相同的进程中部署 gRPC 服务器 - 通过 InprocessChannel 连接。

是否有适用于 iOS 的 gRPC 端口允许执行此操作?

最佳答案

是的,与 gRPC 的 Objective-C 绑定(bind)不同,可以使用 Swift GRPC 在 iOS 上运行 gRPC 服务器。 :

APIs and generated code is provided for both gRPC clients and servers, and can be built either with Xcode or the Swift Package Manager. Support is provided for all four gRPC API styles (Unary, Server Streaming, Client Streaming, and Bidirectional Streaming) and connections can be made either over secure (TLS) or insecure channels.

Echo example包含一个演示服务器和客户端代码的 Mac 应用程序。 iOS 应用程序中的 Swift gRPC 部分应该类似。

关于ios - 在 iOS 上运行 gRPC 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47082603/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com