Get peer IP address and port on OSX in objective-c from NSStream, CFStream or Socket
问题 I have written a server that listens on a specific port for incoming tcp connections. To manage the network connectivity I am using Streams (CFStream/NSStream). When a connection is esthablished I save all the information about this very connection in another instance of a dedicated class which is also set as the delegate for the streams. Now I want to get the public IP of the device that sends me a message through the already esthablished streams, in other words, I would like to store the IP