IOS: NSSocketPort, where are you?

The developer docs are full of links to NSSocketPort, which is supposedly part of the Foundation Foundation. However, I cannot find the header file for NSSocketPort in Foundation. I assume that these are just Mac docs copied to iOS, and that NSSocketPort does not actually exist on iOS.

My question is: is this (read: I'm too bored to find it)? And if not: is there an alternative approach at the Fund level that I can use to establish peer-to-peer communication (outside the Game Kit, since this seems rather capricious)?

References:

http://developer.apple.com/library/ios/#documentation/Networking/Conceptual/NSNetServiceProgGuide/Articles/OperationsonNetworkServices.html#//apple_ref/doc/uid/TP40002525-SW1

+3
source share
1 answer

You are correct that it is referenced everywhere, but does not seem to be part of the Foundation Framework for iOS.

You can use the NSStream class to implement a high-level socket (look at SimpleNetworkStreams ).

I also heard that you can use the smallSockets library (designed for Mac OS, but presumably just fine for iOS) to wrap CF Networking classes.

+3
source

Source: https://habr.com/ru/post/1795533/


All Articles