xcode 如何在 iOS 中编写一个小型(套接字)服务器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7626405/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to write a small (socket) server in iOS
提问by Nicu Surdu
I saw this in some official iOS apps, so I know it's possible and permitted.
我在一些官方 iOS 应用程序中看到了这一点,所以我知道这是可能的并且是允许的。
I want to write a small socket server in iOS that some other application, that I will write for a desktop machine, can connect to and read data from.
我想在 iOS 中编写一个小型套接字服务器,我将为台式机编写的其他应用程序可以连接到并从中读取数据。
Anyone did something like this and can help me with some clues or knows a good starting point ?
任何人都做过这样的事情并且可以帮助我提供一些线索或知道一个好的起点?
采纳答案by AliSoftware
You should read the Stream Programming Guide, the WiTapsample, and many other Programming Guides, Samples and Documentation in Apple's Doc, you will find everything there (including detailed explanations and code)
您应该阅读Apple 文档中的Stream Programming Guide、WiTap示例以及许多其他编程指南、示例和文档,您将在那里找到所有内容(包括详细说明和代码)
If you simply go to the home page of iOS SDK documentation and go in the "Networking & Internet Topics" you have plenty of resources too, including the Network & Internet Starting Pointguide and much more.
如果您只是转到 iOS SDK 文档的主页并进入“网络和 Internet 主题”,那么您也可以获得大量资源,包括网络和 Internet 起点指南等等。