iPhone HTTP Server: reliability on non-WiFi? do networks block the connection?

63 views
Skip to first unread message

Vincent Lasmarias

unread,
Jan 10, 2012, 12:36:53 PM1/10/12
to CocoaHTTPServer
I want to have a running HTTPServer on my iPhone app. I'm planning on
using my own custom port above 1024. In one of the posts here, the
author mentioned that some network providers firewall ports and thus
prevent Cocoa from working in the iPhone. Has anyone else had that
experience? Is the iPhone HTTPServer supposed to work with 3G
networks? Do networks do special things which sometimes prevent the
iPhone HTTPServer from being accessible? If so, do you know what those
special things are and which networks do them? Thanks in advance!

Robbie Hanson

unread,
Jan 10, 2012, 2:57:59 PM1/10/12
to cocoaht...@googlegroups.com
Great question Vincent!

The iPhone itself, and any of it's running applications (such as CocoaHTTPServer, etc) will have no problems accepting incoming connections… in and of themselves.  However, they are at the mercy of whatever network they are attached to.

The primary problem is NAT (network address translation).  NAT is used in most every off-the-shelve WiFi router.  So what does NAT do?

For a full description I'll point you to wikipedia:

But an overly brief description is this:
It won't allow any incoming packets unless the NAT device has recently seen outgoing packets to the IP:port in question.

Long story short: This works good for client applications (making HTTP requests, asking a server for your email, etc).  But for server applications… you're kinda hosed sometimes.

If so, do you know what those
special things are and which networks do them?

Yes, I've heard that many cell phone networks use something conceptually similar to NAT.

-Robbie Hanson



--
You received this message because you are subscribed to the Google Groups "CocoaHTTPServer" group.
To post to this group, send email to cocoaht...@googlegroups.com.
To unsubscribe from this group, send email to cocoahttpserv...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cocoahttpserver?hl=en.


Reply all
Reply to author
Forward
0 new messages