Reputation: 208
I need to listen to a TCP port and collect the binary data from the port in my iphone how this could be done . I had searched a lot for the same but did not find anything worth, please help me any links, or sample code be greatly appretiated
Upvotes: 1
Views: 3195
Reputation: 3141
There is a very useful socket library called GCDAsyncSocket on github that can be used to make both TCP/UDP sockets and comes with delegate methods for reading and writing data
Upvotes: 2
Reputation: 20410
The only thing you need to do is open a socket, you have two options:
Create the socket in pure C: Sockets in C
Or use the classes that Apple provides to work with sockets:
Introduction to Stream Programming Guide for Cocoa
If you are going to do something simple, the first option is the easiest
Upvotes: 2