int main(int argc, char** argv) { Wondruss::Logger::init("org.guildofwriters.wondruss.auth"); asio::io_service io_service; Wondruss::AuthSrv authsrv(io_service); io_service.run(); }
static void tls_activity_cb(struct ev_loop *loop, ev_io *w, int revents) { ev_io *nfq_watcher = (ev_io *) w->data; int ret; int i = 0; if (revents & EV_READ) { ev_io_stop(loop, w); ev_io_stop(loop, nfq_watcher); do { if (i>0) { log_area_printf(DEBUG_AREA_GW, DEBUG_LEVEL_VERBOSE_DEBUG, "remaining data to read"); } /* TODO improve function type here */ ret = authsrv(NULL); } while ((ret != NU_EXIT_ERROR) && (nussl_read_available(tls.session))); ev_io_start(loop, nfq_watcher); if (tls.session) { ev_io_start(loop, w); } i++; } if (revents & EV_ERROR) { tls.auth_server_running = 0; } }