scorpiozj
scorpiozj

Reputation: 2687

how to implement a server on iPhone

Assuming I have implement that : making my app as a server which means in safari I can connect to the app if I input http://url-link.

My question is : if I request http:// url-link/doc, and the server - that is my app can return the content in document directory.

I don't know how to write the web service in iPhone.

As I'm fresh to web service, can any one help me?

thanks

Upvotes: 1

Views: 654

Answers (1)

Guido Domenici
Guido Domenici

Reputation: 5256

This is one possibility: Cocoa HTTP Server. From the project's page:

So with Apple's framework for an HTTP server tucked under our arm we set out to make our own. We wanted the following:

  • Built in support for bonjour broadcasting
  • IPv4 and IPv6 support
  • Asynchronous networking using standard Cocoa sockets/streams
  • Digest access authentication
  • TLS encryption support
  • Extremely FAST and memory efficient
  • Heavily commented code
  • Very easily extensible

You can link this library from your app and effectively make it a mini-web server.

Upvotes: 2

Related Questions