Hello, I' am busy to make an old app up to date and want to use 100% 10.6 cocoa. I have +75% percent done, but there is something what I can't figure out.
Network calls are now using NSSocketPort, except a few that uses a fileHandle or fileDescriptor to get an IP address, like: (NSFileHandle *) fh ... is known and come from another class ... CFSocketRef socket; socket = CFSocketCreateWithNative (kCFAllocatorDefault, [fh fileDescriptor], kCFSocketNoCallBack, NULL, NULL); CFDataRef adrData = CFSocketCopyPeerAddress (socket); struct sockaddr_in *sock = (struct sockaddr_in *)CFDataGetBytePtr(adrData); NSString *address = [NSString stringWithCString:inet_ntoa(sock->sin_addr)]]; ... How can I get the IP address from a fileHandle using Cocoa? What is the Cocoa alternative of CFSocketCreateWithNative and CFSocketCopyPeerAddress? Your help is very appreciated. Thanks in advance _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com