#include "mux.h"
int mux__init(struct mosquitto__listener_sock *listensock, int listensock_count)
{
#ifdef WITH_EPOLL
return mux_epoll__init(listensock, listensock_count);
#else
return mux_poll__init(listensock, listensock_count);
#endif
}
int mux__add_out(struct mosquitto *context)
{
#ifdef WITH_EPOLL
return mux_epoll__add_out(context);
#else
return mux_poll__add_out(context);
#endif
}
int mux__remove_out(struct mosquitto *context)
{
#ifdef WITH_EPOLL
return mux_epoll__remove_out(context);
#else
return mux_poll__remove_out(context);
#endif
}
int mux__add_in(struct mosquitto *context)
{
#ifdef WITH_EPOLL
return mux_epoll__add_in(context);
#else
return mux_poll__add_in(context);
#endif
}
int mux__delete(struct mosquitto *context)
{
#ifdef WITH_EPOLL
return mux_epoll__delete(context);
#else
return mux_poll__delete(context);
#endif
}
int mux__handle(struct mosquitto__listener_sock *listensock, int listensock_count)
{
#ifdef WITH_EPOLL
return mux_epoll__handle(listensock, listensock_count);
#else
return mux_poll__handle(listensock, listensock_count);
#endif
}
int mux__cleanup(void)
{
#ifdef WITH_EPOLL
return mux_epoll__cleanup();
#else
return mux_poll__cleanup();
#endif
}