YAZ
5.34.0
|
Implements event loop handling for GFS. More...
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <yaz/poll.h>
#include <yaz/log.h>
#include <yaz/comstack.h>
#include <yaz/xmalloc.h>
#include "eventl.h"
#include "session.h"
#include <yaz/statserv.h>
Go to the source code of this file.
Functions | |
IOCHAN | iochan_create (int fd, IOC_CALLBACK cb, int flags, int chan_id) |
int | iochan_is_alive (IOCHAN chan) |
int | iochan_event_loop (IOCHAN *iochans, int *watch_sig) |
Variables | |
static int | log_level =0 |
static int | log_level_initialized =0 |
Implements event loop handling for GFS.
This source implements the main event loop for the Generic Frontend Server.
Definition in file eventl.c.
IOCHAN iochan_create | ( | int | fd, |
IOC_CALLBACK | cb, | ||
int | flags, | ||
int | chan_id | ||
) |
Definition at line 42 of file eventl.c.
References iochan::chan_id, iochan::destroyed, iochan::fd, iochan::flags, iochan::force_event, iochan::fun, iochan::last_event, log_level, log_level_initialized, iochan::max_idle, iochan::next, xmalloc, and yaz_log_module_level().
Referenced by add_listener(), inetd_connection(), and new_session().
int iochan_event_loop | ( | IOCHAN * | iochans, |
int * | watch_sig | ||
) |
Definition at line 81 of file eventl.c.
References iochan::destroyed, EVENT_EXCEPT, EVENT_INPUT, EVENT_OUTPUT, EVENT_TIMEOUT, iochan::fd, yaz_poll_fd::fd, iochan::flags, iochan::force_event, iochan::fun, yaz_poll_fd::input_mask, iochan::last_event, log_level, iochan::max_idle, iochan::next, yaz_poll_fd::output_mask, statserv_remove(), xfree, xmalloc, yaz_errno(), yaz_log(), yaz_poll(), yaz_poll_add, yaz_poll_except, yaz_poll_none, yaz_poll_read, yaz_poll_write, YLOG_ERRNO, and YLOG_WARN.
Referenced by daemon_handler(), and new_session().
int iochan_is_alive | ( | IOCHAN | chan | ) |
Definition at line 66 of file eventl.c.
References EVENT_INPUT, iochan::fd, yaz_poll_fd::fd, yaz_poll_fd::input_mask, ir_read(), yaz_poll(), and yaz_poll_read.
Referenced by bend_assoc_is_alive().
|
static |
Definition at line 39 of file eventl.c.
Referenced by iochan_create(), iochan_event_loop(), yaz_log_xml_errors(), and yaz_mutex_set_name().
|
static |
Definition at line 40 of file eventl.c.
Referenced by initlog(), and iochan_create().