• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
iPhone: CFWriteStreamWrite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iPhone: CFWriteStreamWrite


  • Subject: iPhone: CFWriteStreamWrite
  • From: email@hidden
  • Date: Sat, 5 Jul 2008 19:44:43 +0200

Hi All,

I have a problem transferring data using a CFWriteStream at least in
the iPhone simulator, CFWriteStream does not accept data and blocks forever.

I created a CFSocket  CFSocketCreate(kCFAllocatorDefault, 
                                        PF_INET, 
                                        SOCK_STREAM, 
                                        IPPROTO_TCP, 
                                        kCFSocketAcceptCallBack, 
                                        (CFSocketCallBack)&acceptCallBack, 
                                        &socketCtxt);

installed a callback and also can connect to the socket using telnet or safari.
The callback is called and then I create a read and write stream to the socket using
CFStreamCreatePairWithSocket.
After that I open a write stream calling CFWriteStreamOpen.
And the stream status shows open.
But CFWriteStreamCanAcceptBytes returns always false and CFWriteStreamWrite blocks forever.

Is there something I forgot to configure?
I have been searching for 2 days now and cannot figure out what the problem is.

Thanks in advance...

regards
alex
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: iPhone: CFWriteStreamWrite
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: TCP connection between Obj-C and java program
  • Next by Date: Re: iPhone: CFWriteStreamWrite
  • Previous by thread: TCP connection between Obj-C and java program
  • Next by thread: Re: iPhone: CFWriteStreamWrite
  • Index(es):
    • Date
    • Thread