• 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: [Q] CFSocket & RunLoop --2nd try
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] CFSocket & RunLoop --2nd try


  • Subject: Re: [Q] CFSocket & RunLoop --2nd try
  • From: Stephane Sudre <email@hidden>
  • Date: Thu, 22 Jan 2004 11:28:46 +0100

Le jeudi, 22 jan 2004, ` 09:31 Europe/Paris, Rogier Bosch a icrit :

Hay Group,

ok, in the rebound :)

How do i end/stop the runloop when using CFSocket (UDP) & RunLoop (CFSocketCreateRunLoopSource)?

I would think that inside the callback function, cause i know when i have received the last bytes. So that's the place to stop the runloop?

On the other-hand i don't have a pointer to the runloop inside this (callback) function. While CFRunLoopGetCurrent() returns only the mainloop. So a CFRunLoopStop() -inside the callback- doesn't seem right.

So how to deal with this...?? or any pointers on the net are appreciated.

Thanks in advance!!

Maybe that can help.

if (socketRef_!=NULL)
{
CFRunLoopRemoveSource( mainRunLoopRef_, socketSource_, kCFRunLoopDefaultMode );
CFRelease(socketSource_);

CFSocketInvalidate(socketRef_);

(void) close(CFSocketGetNative(socketRef_));

CFRelease(socketRef_);
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >[Q] CFSocket & RunLoop --2nd try (From: Rogier Bosch <email@hidden>)

  • Prev by Date: RE: matching interface builder object to source
  • Next by Date: Questions on APInstallerURL, APFiles & CFBundleIconFile
  • Previous by thread: [Q] CFSocket & RunLoop --2nd try
  • Next by thread: Re: [Q] CFSocket & RunLoop --2nd try
  • Index(es):
    • Date
    • Thread