views:

153

answers:

2

Hi,

I am working on iphone networking application.. I am using asihttp , a wrapper of the CFnetwork framework. http://allseeing-i.com/ASIHTTPRequest/

I want to build a server that sends some data on request from the client... I want this for the sole purpose of testing the application i write and understanding the networking more deeply..

Any help is appreciated Thank you

A: 

Seems like the most straight forward solution is to setup an Apache HTTPD server and just put a static document at the location you want your data to come from.

mlathe
is it possible to do the tcp ip "echo" program using asihttp ?
srk
osx ships with httpd built in, just turn on web sharing
slf
A: 

The two most simple approaches that come to mind:

  • Enable Web Sharing on your Mac. You can then access the documents in your Sites directory inside your home directory. The Sharing preference pane will tell you the exact URL.
  • If static content is not enough, write a little Python web server to serve content. Python comes with standard HTTP Server modules. You can get stuff going with like half a dozen of lines of code.
St3fan