I'm using CFStreamCreatePairWithSocketToNetService to get read/write streams. 
According to the documentation, "The streams do not create a socket, resolve 
the service, or connect to the service’s host until you open one of the 
streams." I open the streams with CFReadStreamOpen and CFWriteStreamOpen. The 
streams are open and can be read from and written to. Yet I can't get the 
remote host and port from the API. I try CFNetServiceGetTargetHost and 
CFNetServiceGetPortNumber on both my original CFNetServiceRef and 
kCFStreamPropertySocketRemoteNetService, but I always get NULL and 0. I try to 
get kCFStreamPropertySocketRemoteHostName and 
kCFStreamPropertySocketRemotePortNumber from both the read stream and the write 
stream, but again I always get NULL.

Isn't this supposed to work? Isn't the net service supposed to resolve when you 
open the streams?


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to