IPhone TCP Communication

I am looking for a “simple” use of transmitting TCP packets between iphone and server.

I assume this is basically an open socket, specify the port and IP and press send. (this is what I usually do with Python)

Does anyone know a quick start guide or a mannequin tutorial?

+5
source share
2 answers

This is a pretty good article: iPhone Networking

+2
source

In the iPhone SDK, you can do posix socket programming (as with any other UNIX-based operating system). There are many examples of how to do this.

, , , HTTP / iOS . . .

HTTP- iPhone, , :

NSURL* url = [NSURL urlWithString: @"http://eexample.com/page.php?param=2323"];
NSString* stringForUrlPath = [NSString stringWithContentsOfURL: url 
                                                  encoding: NSUTF8StringEncoding 
                                                     error: nil];
// in stringForUrlPath you will hold whatever the server responded you
+2

All Articles