[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Different behavior of my code



To use libevent with normal files (as opposed to sockets), you need to
ensure a backend which supports normal files is used, something like:

        evcfg = event_config_new();
        if (NULL == evcfg) {
                printf("%s: event_config_new() failed!\n", progname);
                return -1;
        }
        event_config_require_features(evcfg, EV_FEATURE_FDS);
        base = event_base_new_with_config(evcfg);
        event_config_free(evcfg);
        if (NULL == base) {
                printf("%s: event_base_new() failed!\n", progname);
                return -1;
        }

I am not sure when event_config_require_features() appeared, but the
docs at libevent.org suggest it was in libevent 2.0.

Good luck,
Dave Hart
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.