gpt4 book ai didi

iOS CFStreamCreatePairWithSocketToHost 本地端口

转载 作者:可可西里 更新时间:2023-11-01 02:34:35 25 4
gpt4 key购买 nike

我正在尝试通过 TCP 将 iOS 设备连接到服务器。我目前正在使用函数 CFStreamCreatePairWithSocketToHost。我的问题是我想设置 iOS 设备需要使用的本地端口。有没有人对此有经验并可以告诉我该怎么做?

最佳答案

我找到了答案。

我现在正在使用 cocoaasyncsocket library .使用函数 connectToAddress: viaInterfaceAddress: withTimeout: error: 连接主机让我可以定义我的本地端口。

关于iOS CFStreamCreatePairWithSocketToHost 本地端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7848569/

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