문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top