服务器/客户端iphone应用程序的任何示例,其中服务器和客户端都是iOS设备? [英] any examples of a server/client iphone app where both the server and clients are iOS devices?

查看:175
本文介绍了服务器/客户端iphone应用程序的任何示例,其中服务器和客户端都是iOS设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个服务器/客户端应用程序,其中一个iphone运行服务器,同一个wifi网络上的所有其他设备可以连接到服务器设备并发送和接收信息。是否有任何在设备上运行服务器并让网络上的其他设备搜索它的示例?

I would like to create a server/client application where one iphone is running a server, and all other devices on the same wifi network can connect to the server device and send and receive information. Are there any examples of running a server on a device and letting other devices on the network search for it?

我研究过使用GameKit,但16人最大限制是不幸的。 cocoaasyncsocket 似乎是个不错的选择,但如何将一台设备设置为服务器,以及在其他设备上搜索它?

I looked into using GameKit, but the 16 person max limit is unfortunate. cocoaasyncsocket seems like a good option, but how do I set up one device as the server, and search for it on other devices?

推荐答案

WiTap示例代码可能是您正在寻找的(或至少是一个好的)开始的地方):

The WiTap sample code may be what you're looking for (or at least a good place to start):

http://developer.apple.com/library/ios/#samplecode/WiTap/Introduction/Intro.html

这篇关于服务器/客户端iphone应用程序的任何示例,其中服务器和客户端都是iOS设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆