iPhone HTTP Server

2019-03-11 19:59发布

Can someone give me simple code to help with creating an HTTP server for the iPhone. Something simple with much documentation would be appreciated. Anything you have please share.

3条回答
趁早两清
2楼-- · 2019-03-11 20:14

If you're unfamiliar with network programming your best bet is to first read Beej's Guide to Network Programming and then read the HTTP 1.1 spec before you look at source code (as you should have an understanding of the protocol before you start looking at implementations).

A simple Google search turned up cocoahttpserver and iSpit. Otherwise, you could download Apache and look at its source code, but that's not exactly a simple implementation.

查看更多
劳资没心,怎么记你
3楼-- · 2019-03-11 20:22

There are sample codes from Apple and open source community such as cocoahttpserver TouchHTTPD.

Here's a summary blog

查看更多
The star\"
4楼-- · 2019-03-11 20:30

Another open-source HTTP server for iPhone is the lightweight GCDWebServer which is built on top of Grand Central Dispatch. It's only a few source code files and offers a simple and extensible API.

查看更多
登录 后发表回答