English 中文(简体)
从 iPhone/ iPod 与 Windows 通信
原标题:Communicating with Windows from an iPhone/iPod

我期待在iOS应用软件上工作,该应用软件需要在 iPhone/iPod 和 Windows 上运行的服务之间, 发送/ 接收数据。 从通信角度讲, 我将使用套接字 。

  • The Phone will send/receive data to/from a Windows service (NOT a web service)
  • Sockets will be used as a means for communication
  • The iPhone/iPod will be connected to WiFi using a static IP address
  • The iPhone/iPod is intended to be as thin client as possible

目的是让 Windows Service 从 iPhone/ iPod 收听事件。 例如 :

输入需要从 UIText Field 中提取, 并按下按钮保存为字符串 。 在按键时, 事件必须启动, 然后通过 WiFi 发送到 Windows Service 服务处, 然后接收事件, 执行“ 服务器边” 动作, 然后将回复发送到 iPhone/ iPod 上 。

我对iOS的开发还是很新奇 我知道这是一些更先进的东西 但任何帮助或资源 都能帮助完成这个任务 我很感激

谢谢!

最佳回答

这是标准网络材料, 与您使用的平台无关。 您可以在 iOS 上做 :

1) use berkley sockets (standard unix stuff). 2) use the Cocoa wrapper for sockets (NSSocketPort etc). 3) use a framework such as MKNetworkKit (here).

我本人将使用备选案文3:)

有一件事有利于你,就是Windows机器和iPad都是小东西,所以你不必担心字节擦字(如果你只是发送字符串,你也不会这样做)。

EDIT: 要让窗口发现您的设备, 您需要配置设置IP 地址细节, 或者使用 Apple s bangjour 服务, 或者一些自定义的解决方案 。

问题回答

暂无回答




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签