What does this do? And, CFNetworking tutorials?

Discussion in 'Mac Programming' started by chowjyc, May 3, 2009.

  1. chowjyc macrumors newbie

    Mar 5, 2009
    Hello everyone!

    I have no previous MAC Programming experience (nor much C++ experience) but I have to pull something off in a short time, can anyone explain to me what the following does?

    EventLoopTimerRef idleEventLoopTimer;
    InstallEventLoopTimer (GetCurrentEventLoop (), kEventDurationSecond / 25., kEventDurationSecond / 25., idleTimerProc, effect, &idleEventLoopTimer);

    RunAppModalLoopForWindow (window);
    RemoveEventLoopTimer (idleEventLoopTimer);

    And any tutorial pointing to CFnetworking is cool, I want to implement a server socket inside this loop...

    Apple's CFNetwork tutorials is very hard to understand at the moment because it has no sample code.


  2. kainjow Moderator emeritus


    Jun 15, 2000
    It sets up a timer to run every 0.04 seconds, then runs a blocking modal window loop. You can look up these functions in the docs for more info.

    A quick google didn't show any good CFNetwork tutorials, but you don't have to use that for sockets. You can use any other C/C++ based API.

Share This Page