|
pazpar2
1.6.31
|
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 "host.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) |
| static int | connection_is_idle (struct connection *co) |
| ZOOM_connection | connection_get_link (struct connection *co) |
| static void | remove_connection_from_host (struct connection *con) |
| static void | connection_destroy (struct connection *co) |
| static struct connection * | connection_create (struct client *cl, struct host *host, int operation_timeout, int session_timeout, iochan_man_t iochan_man) |
| static void | non_block_events (struct connection *co) |
| void | connection_continue (struct connection *co) |
| static void | connection_handler (IOCHAN iochan, int event) |
| static void | connection_release (struct connection *co) |
| void | connect_resolver_host (struct host *host, iochan_man_t iochan_man) |
| static struct host * | connection_get_host (struct connection *con) |
| 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 476 of file connection.c.
References connection::client, Client_Error, client_get_connection(), client_get_database(), client_get_id(), client_get_session(), client_get_state(), Client_Idle, client_incref(), client_set_connection(), client_set_state(), Client_Working, host::cond_ready, connection_create(), connection_is_idle(), connection_release(), host::connections, session_database::database, find_host(), connection::host, database::id, connection::link, host::mutex, connection::next, connection::operation_timeout, PZ_AUTHENTICATION, PZ_MAX_CONNECTIONS, PZ_REUSE_CONNECTIONS, PZ_SRU, PZ_URL, PZ_ZPROXY, session_setting_oneval(), connection::session_timeout, session_timeout(), connection::state, and connection::zproxy.
Referenced by client_start_search().
| void connect_resolver_host | ( | struct host * | host, |
| iochan_man_t | iochan_man | ||
| ) |
Definition at line 352 of file connection.c.
References connection::client, client_start_search(), connection::Conn_Closed, connection_connect(), connection_destroy(), host::connections, host::ipport, host::mutex, connection::next, remove_connection_from_host(), and connection::state.
Referenced by iochan_handler().
|
static |
Definition at line 401 of file connection.c.
References connection::client, Client_Connecting, client_get_database(), client_set_state(), connection_get_host(), connection_handler(), connection::iochan, iochan_add(), iochan_create(), iochan_setdata, iochan_settimeout, host::ipport, connection::link, connection::operation_timeout, PACKAGE_NAME, host::proxy, PZ_APDULOG, PZ_AUTHENTICATION, PZ_NEGOTIATION_CHARSET, PZ_SRU, PZ_SRU_VERSION, session_setting_oneval(), connection::state, host::tproxy, host::url, and VERSION.
Referenced by connect_resolver_host(), and connection_create().
| void connection_continue | ( | struct connection * | co | ) |
Definition at line 279 of file connection.c.
References connection::iochan, iochan_setfd, iochan_setflags, connection::link, and non_block_events().
Referenced by client_fetch_more(), client_send_raw_present(), and client_start_search().
|
staticread |
Definition at line 167 of file connection.c.
References connection::client, client_set_connection(), connection::Conn_Closed, connection_connect(), connection_use(), host::connections, connection::host, host::ipport, connection::link, host::mutex, connection::next, connection::operation_timeout, connection::session_timeout, session_timeout(), connection::state, and connection::zproxy.
Referenced by client_prep_connection().
|
static |
Definition at line 146 of file connection.c.
References connection::client, client_disconnect(), connection_use(), connection::host, connection::iochan, iochan_destroy, connection::link, host::url, and connection::zproxy.
Referenced by connect_resolver_host(), and connection_handler().
|
staticread |
Definition at line 396 of file connection.c.
References connection::host.
Referenced by connection_connect().
| ZOOM_connection connection_get_link | ( | struct connection * | co | ) |
Definition at line 124 of file connection.c.
References connection::link.
Referenced by client_record_response(), client_search_response(), and client_start_search().
|
static |
Definition at line 291 of file connection.c.
References connection::client, client_lock(), client_unlock(), connection_destroy(), EVENT_TIMEOUT, connection::host, iochan_getdata, iochan_setfd, iochan_setflags, connection::link, host::mutex, non_block_events(), and remove_connection_from_host().
Referenced by connection_connect().
|
static |
Definition at line 107 of file connection.c.
References connection::Conn_Open, connection::link, and connection::state.
Referenced by client_prep_connection().
|
static |
Definition at line 342 of file connection.c.
References connection::client, and client_set_connection().
Referenced by client_prep_connection().
|
static |
Definition at line 56 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 74 of file connection.c.
References connection_use().
|
static |
Definition at line 198 of file connection.c.
References client::addinfo, connection::client, client_check_preferred_watch(), Client_Error, client_get_id(), client_got_records(), Client_Idle, client_record_response(), client_search_response(), client_set_diagnostic(), client_set_state(), Client_Working, host::cond_ready, error(), connection::host, connection::iochan, iochan_settimeout, connection::link, connection::operation_timeout, connection::session_timeout, and connection::state.
Referenced by connection_continue(), and connection_handler().
|
static |
Definition at line 129 of file connection.c.
References host::cond_ready, host::connections, connection::host, and connection::next.
Referenced by connect_resolver_host(), and connection_handler().
|
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().
|
static |
Definition at line 54 of file connection.c.
Referenced by connection_use().
1.8.1.2