Receiving Error Domain=kCFErrorDomainCFNetwork Code=2 when attempting to read from ReadStream
Posted
by theactiveactor
on Stack Overflow
See other posts from Stack Overflow
or by theactiveactor
Published on 2010-05-24T14:15:17Z
Indexed on
2010/05/24
15:31 UTC
Read the original article
Hit count: 484
iphone
|cocoa-touch
I'm attempting to synchronously read from a CFReadStream
objected created by CFStreamCreatePairWithSocketToHost
. The stream opened fine but when I attempt to invoke CFReadStreamRead
on it in a loop, CFReadStreamRead() returns -1 and the resulting error is:
Error Domain=kCFErrorDomainCFNetwork Code=2 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.)" UserInfo=0x14a920 {kCFGetAddrInfoFailureKey=8}
I'm also receiving this same exact error when using this ReadStream asynchronously- the first callback I receive is this error.
© Stack Overflow or respective owner