pazpar2
1.14.1
|
Z39.50 connection (low-level client) More...
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <assert.h>
#include <yaz/log.h>
#include <yaz/comstack.h>
#include <yaz/tcpip.h>
#include "connection.h"
#include "session.h"
#include "client.h"
#include "settings.h"
Go to the source code of this file.
Data Structures | |
struct | connection |
Represents a physical, reusable connection to a remote Z39.50 host. More... | |
Functions | |
static int | connection_use (int delta) |
int | connections_count (void) |
static int | connection_connect (struct connection *con, iochan_man_t iochan_man) |
ZOOM_connection | connection_get_link (struct connection *co) |
void | connection_mark_dead (struct connection *co) |
static void | connection_destroy (struct connection *co) |
static struct connection * | connection_create (struct client *cl, const char *url, const char *zproxy, int operation_timeout, int session_timeout, iochan_man_t iochan_man) |
static void | non_block_events (struct connection *co) |
static void | iochan_update (struct connection *co) |
void | connection_continue (struct connection *co) |
static void | connection_handler (IOCHAN iochan, int event) |
void | connection_release2 (struct connection *co) |
int | client_prep_connection (struct client *cl, int operation_timeout, int session_timeout, iochan_man_t iochan_man, const struct timeval *abstime) |
Variables | |
static YAZ_MUTEX | g_mutex = 0 |
static int | no_connections = 0 |
static int | total_no_connections = 0 |
Z39.50 connection (low-level client)
Definition in file connection.c.
int client_prep_connection | ( | struct client * | cl, |
int | operation_timeout, | ||
int | session_timeout, | ||
iochan_man_t | iochan_man, | ||
const struct timeval * | abstime | ||
) |
Definition at line 471 of file connection.c.
References client_get_connection(), client_get_database(), client_get_id(), connection_create(), session_database::database, database::id, connection::link, PZ_URL, PZ_ZPROXY, session_setting_oneval(), and session_timeout().
Referenced by client_start_search().
|
static |
Definition at line 328 of file connection.c.
References Client_Connecting, Client_Error, client_get_database(), client_get_id(), client_get_session(), client_set_diagnostic(), client_set_state(), client_set_state_nb(), connection_handler(), error(), iochan_add(), iochan_create(), iochan_destroy(), iochan_setdata, iochan_settimeout, PACKAGE_NAME, PZ_APDULOG, PZ_AUTHENTICATION, PZ_AUTHENTICATION_MODE, PZ_MEMCACHED, PZ_NEGOTIATION_CHARSET, PZ_REDIS, PZ_SRU, PZ_SRU_VERSION, session_log(), session_setting_oneval(), and VERSION.
Referenced by connection_create().
void connection_continue | ( | struct connection * | co | ) |
Definition at line 266 of file connection.c.
References connection::client, client_lock(), client_unlock(), iochan_update(), connection::link, and non_block_events().
Referenced by client_fetch_more(), client_send_raw_present(), and client_start_search().
|
static |
Definition at line 138 of file connection.c.
References connection::client, client_set_connection(), connection::Conn_Closed, connection_connect(), connection_destroy(), connection_use(), connection::iochan, connection::link, connection::operation_timeout, connection::session_timeout, session_timeout(), connection::state, connection::url, and connection::zproxy.
Referenced by client_prep_connection().
|
static |
Definition at line 117 of file connection.c.
References connection::client, client_disconnect(), connection_use(), connection::iochan, iochan_destroy(), connection::link, connection::url, and connection::zproxy.
Referenced by connection_create(), and connection_handler().
ZOOM_connection connection_get_link | ( | struct connection * | co | ) |
Definition at line 106 of file connection.c.
References connection::link.
Referenced by client_record_response(), client_search_response(), and client_start_search().
|
static |
Definition at line 281 of file connection.c.
References connection::client, client_lock(), client_unlock(), connection_destroy(), EVENT_TIMEOUT, iochan_getdata, iochan_update(), connection::link, and non_block_events().
Referenced by connection_connect().
void connection_mark_dead | ( | struct connection * | co | ) |
Definition at line 111 of file connection.c.
References connection::iochan, and iochan_settimeout.
Referenced by client_mark_dead().
void connection_release2 | ( | struct connection * | co | ) |
Definition at line 323 of file connection.c.
References connection::client.
Referenced by client_stop().
|
static |
Definition at line 55 of file connection.c.
References g_mutex, no_connections, and total_no_connections.
Referenced by connection_create(), connection_destroy(), and connections_count().
int connections_count | ( | void | ) |
Definition at line 73 of file connection.c.
References connection_use().
|
static |
Definition at line 253 of file connection.c.
References connection::iochan, iochan_setfd, iochan_setflags, and connection::link.
Referenced by connection_continue(), and connection_handler().
|
static |
Definition at line 173 of file connection.c.
References client::addinfo, connection::client, Client_Error, client_get_id(), client_get_session(), client_got_records(), Client_Idle, client_record_response(), client_search_response(), client_set_diagnostic(), client_set_state(), Client_Working, error(), connection::iochan, iochan_settimeout, connection::link, connection::operation_timeout, session_log(), connection::session_timeout, and connection::state.
Referenced by connection_continue(), and connection_handler().
|
static |
Definition at line 51 of file connection.c.
Referenced by connection_use().
|
static |
Definition at line 52 of file connection.c.
Referenced by connection_use().
|
static |
Definition at line 53 of file connection.c.
Referenced by connection_use().