• 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: CFSocket
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFSocket


  • Subject: Re: CFSocket
  • From: "sunil prajapati" <email@hidden>
  • Date: Fri, 23 Nov 2007 16:38:40 +0530

On Nov 21, 2007 9:39 PM, sunil prajapati <email@hidden> wrote:
> Hi Guys,
>
> I have developed one client/server application in Carbon.
> I am getting the problem when I create the CFSocket on a thread then
> the  callback function does not work. But when I create it in a normal
> function then it works properly.
> What is the reason CFSocket does not work on my created thread?
>
> Thanks,
> Sunil.
>


Now I m using RunApplicationEventLoop(); function at the end of my
created CFSocket thread.
Now it is working fine.

As for main function concern I m not using RunLoop function instead of
that at the end of main function I m using while(1) which get call
after sleep(2) seconds. Intention to use while  is because of one
reason. I have made my application as unix executable and I launch it
from "StartupItems" that is why its owner becomes "root" which will be
coman for all user when user use FastUser switching. Even when the
user logout then also my unix executable is always in running mode.

Problem comes when I use  RunApplicationEventLoop(); at the end of
main function and launch my unix executable  from "StartupItems" and
then logout the user ,my unix executable  get quit after logout and
when i use while(1) then it does not quit. Even when I use Carbon API
"InstallEventLoopTimer" to create timer then also after logout my unix
executable get quit.
The  Carbon API "SendAppleEventToSystemProcess" which is I m using for
restart(kAERestart),shutdown(kAEShutDown),logout (kAEReallyLogOut) the
system does not work.

I don't why all those things are happening when I launch my unix
executable from  "StartupItems" ?

Thanks,
sunil.
 _______________________________________________
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: CFSocket
      • From: Steve Sisak <email@hidden>
References: 
 >CFSocket (From: "sunil prajapati" <email@hidden>)

  • Prev by Date: Re: Airport Framework / API
  • Next by Date: Re: CFSocket
  • Previous by thread: Re: CFSocket
  • Next by thread: Re: CFSocket
  • Index(es):
    • Date
    • Thread