• 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
Re: [OSX Core Foundation]How can I asynchronously upload a file though HTTP and get a callback called while sending bytes of the stream?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OSX Core Foundation]How can I asynchronously upload a file though HTTP and get a callback called while sending bytes of the stream?


  • Subject: Re: [OSX Core Foundation]How can I asynchronously upload a file though HTTP and get a callback called while sending bytes of the stream?
  • From: Rémy Saissy <email@hidden>
  • Date: Thu, 2 Dec 2010 13:46:20 +0100

Hi,
as shown in SampleURLConnection, I created a CFWriteStreamRef using a
CFSocket previously created and connected to the server and configured
with
	CFSocketSetSocketFlags(sock, kCFSocketAutomaticallyReenableWriteCallBack);
	CFSocketEnableCallBacks(sock, kCFSocketWriteCallBack);
event though there is no Write callback defined at socket level.
Then I bound it to my WriteStream with  CFStreamCreatePairWithSocket
set a delegate with CFWriteStreamSetClient and scheduled the Write
Stream on the runloop.

It works except that the callback only works for the first event
(kCFStreamEventOpenCompleted). After, it is like disabled.
right before I tried with a CFSocket directly and setting the
kCFSocketAutomaticallyReenableWriteCallback flag fixed this behaviour.
Should I use something else when at WriteStream level?
Thank you very much.




On Wed, Dec 1, 2010 at 5:53 PM, Quinn "The Eskimo!" <email@hidden> wrote:
>
> On 1 Dec 2010, at 16:46, Rémy Saissy wrote:
>
>> I would prefer to avoid using Cocoa since my launch agent is exclusively written using CF.
>
> Understood.  However, we definitely prefer folks using NSURLConnection where at all possible.
>
> S+E
> --
> Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
>
>
>  _______________________________________________
> 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
>



--
Rémy Saissy
Web:     http://picasaweb.google.fr/remy.saissy
"J'aime les belles plantes car cela me donne envie de devenir jardinier."
 _______________________________________________
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: [OSX Core Foundation]How can I asynchronously upload a file though HTTP and get a callback called while sending bytes of the stream?
      • From: Mark Pauley <email@hidden>
    • Re: [OSX Core Foundation]How can I asynchronously upload a file though HTTP and get a callback called while sending bytes of the stream?
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
References: 
 >[OSX Core Foundation]How can I asynchronously upload a file though HTTP and get a callback called while sending bytes of the stream? (From: Rémy Saissy <email@hidden>)
 >Re: [OSX Core Foundation]How can I asynchronously upload a file though HTTP and get a callback called while sending bytes of the stream? (From: "Quinn \"The Eskimo!\"" <email@hidden>)
 >Re: [OSX Core Foundation]How can I asynchronously upload a file though HTTP and get a callback called while sending bytes of the stream? (From: Rémy Saissy <email@hidden>)
 >Re: [OSX Core Foundation]How can I asynchronously upload a file though HTTP and get a callback called while sending bytes of the stream? (From: "Quinn \"The Eskimo!\"" <email@hidden>)

  • Prev by Date: Re: Problem sending UDP broadcast on OS/X 10.5 Leopard on MacPro1, 1
  • Next by Date: Re: Problem sending UDP broadcast on OS/X 10.5 Leopard on MacPro1, 1
  • Previous by thread: Re: [OSX Core Foundation]How can I asynchronously upload a file though HTTP and get a callback called while sending bytes of the stream?
  • Next by thread: Re: [OSX Core Foundation]How can I asynchronously upload a file though HTTP and get a callback called while sending bytes of the stream?
  • Index(es):
    • Date
    • Thread