定义 GKSessionModeServer 和 GKSessionModeClient
我的问题是,我必须使用 GameKit 框架连接许多设备。 两个连接一切正常(GKSessionModePeer
) 我在互联网上搜索了很多关于如何连接两个以上设备的信息,我得到的是使用 GKSessionModeServer 和 GKSessionModeClient 。我还阅读了苹果文档。
但对于如何使用 GKSessionModeServer 和 GKSessionModeClient 意味着哪个设备将充当服务器、哪个设备将充当客户端,仍然没有任何明确的解决方案。
如果有人知道如何处理这个问题或我应该采取什么方法,请告诉我。
任何帮助将不胜感激。
My problem is that , I have to connect many devices using GameKit
framework.
Everything works fine with two connections(GKSessionModePeer
)
I searched a lot on internet on how to connect more than two devices and what I got is, to use GKSessionModeServer
and GKSessionModeClient
.I read the apple documentation also.
But still there is not any clear cut solution on how to use GKSessionModeServer
and GKSessionModeClient
means which device will act as server and which will act as client.
Please if any one know how to handle this or what approach should I follow, tell me.
Any help would be highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有在游戏中使用 3 台设备进行尝试,但也许这会对您有所帮助(它适用于大厅中的 5 台设备)。
听起来有点复杂,但比标准 ios 邀请方案效果好得多(这是 3.1 的痛苦经历)
问候!
I didnt try it with 3 devices ingame, but maybe this will help you (it worked with 5 devices in lobby).
it sounds a bit complicated but works much better than standard ios invitation scheme (it was traumatic experience with 3.1)
Regards!