Question

I need to communicate with a hardware device using TCP and with Windows I would use WinSock.

What is the equivalent library that I can use from the iPhone SDK?

Was it helpful?

Solution

There isn't anything like winsock per-se, there is Objective-C wrappers around POSIX Sockets, like NSUrl and the like. This (Network Programming - iPhone SDK) might help with getting an idea about what is available.

OTHER TIPS

WinSock is Window's version of the BSD socket. iPhoneOS being Darwin having a BSD user-land of course has a socket API (<sys/socket.h> etc) too.

See http://en.wikipedia.org/wiki/Berkeley_sockets.

In CoreFoundation there is also a higher level API called CFSocket. (The Foundation version, NSSocketPort, is not available on iPhoneOS.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top