iPhone与iPhone之间的Ad Hoc Wifi连接Mac - 可能吗? [英] Ad Hoc Wifi Connection Between iPhone & Mac - Possible?

查看:201
本文介绍了iPhone与iPhone之间的Ad Hoc Wifi连接Mac - 可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道是否可以使用两台设备上的Wifi硬件在iPhone和Mac之间建立数据传输隧道?我的主要目标是通过一个临时wifi连接的应用程序将数据从我的iPhone传输到我的Mac。如果您有任何其他方法需要建议,请做。

I was just wondering if it is possible to set up a data transfer tunnel between an iPhone and a Mac using the Wifi hardware present on both devices? My main objective is to transfer data from my iPhone to my Mac through an app along an ad hoc wifi connection. If there are any other methods you would like to suggest, then please do.

期待您的回复。

谢谢!

AK

推荐答案

您可以通过 NSNetServices CFNetServices API来使用Bonjour。

You can make use of Bonjour, via NSNetServices and CFNetServices APIs.

基本上:


  1. 在Mac上创建服务器

  2. 通过Bonjour宣布服务器

  3. 在手机上浏览Bonjour并解析bonjour服务。

  4. 建立连接

  5. 通过套接字流交换数据

  1. Create a server on the Mac
  2. Announce the server via Bonjour
  3. Browse Bonjour on the phone and resolve the bonjour service.
  4. Establish connection
  5. Exchange data via socket streams

这篇关于iPhone与iPhone之间的Ad Hoc Wifi连接Mac - 可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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