Hi!

We use libev in Linux (2.6.35 on big/small endian ARM) for a simple
network client application where we want to timeout connect() attempts.

        http://www.unixguide.net/network/socketfaq/3.5.shtml

For this purpose we use the following construct in a libev callback.

        timeout = NULL_TIMER;
        timeout.it_value.tv_sec = 10;
        setitimer(ITIMER_REAL, &timeout, NULL);
        if (connect (...) == -1) { ... }
        timeout = NULL_TIMER;
        setitimer (ITIMER_REAL, &timeout, NULL);

Is this OK for use with libev, or do you have any other recommendation?
Basically we're a bit concerned if it conflicts with the internal timer
implementation, or event loop, in libev.

Regards
 /Joachim

_______________________________________________
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to