Re: CFSocket and kCFRunLoopDefaultMode
Re: CFSocket and kCFRunLoopDefaultMode
- Subject: Re: CFSocket and kCFRunLoopDefaultMode
- From: "Duane Murphy" <email@hidden>
- Date: Wed, 20 Aug 2003 22:12:30 -0700
I worked it out. The problem was the last parameter to
CFRunLoopRunInMode. By making returnAfterSourceHandled with
kCFRunLoopDefaultMode, an source has been handled just not the one I was
expecting. (Say like a mouse moved or window updated :-).
Thanks for the help.
--- At Wed, 20 Aug 2003 21:25:42 -0700, Duane Murphy wrote:
>
I am using CFSocket with a raw ethernet port. When I add the CFSocket run
>
loop source to the current run loop (the main run loop) I used
>
kCFRunLoopDefaultMode
>
>
CFRunLoopAddSource(
>
CFRunLoopGetCurrent(), run_loop_source_, kCFRunLoopDefaultMode );
>
>
Then I called
>
>
CFRunLoopRunInMode( kCFRunLoopDefaultMode, 3, true );
>
>
But the call back was never called. If I change the run loop mode to some
>
string of mine for both calls then the call back works as expected.
>
>
My goal is to eventually add the CFSocket RunLoopSource to the main
>
RunLoop and call WaitNextEvent. Hence using kCFRunLoopDefaultMode.
>
>
There seems be some problem somewhere. I dont know enough about run loops
>
to know where I could be going wrong.
>
>
What is the problem here and is there a work around? Is WNE going to work
>
correctly instead of calling CFRunLoopRunInMode?
>
>
...Duane
>
>
Hmm, this is in a CodeWarrior console application (all output ends up in
>
the log window). I now suspect that WaitNextEvent is never called and
>
that there is no kCFRunLoopDefaultMode. But that wouldn't make sense
>
because then it would just be like any other mode. Just some random thoughts.
...Duane
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.