pazpar2  1.13.0
Data Structures | Functions | Variables
connection.c File Reference

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 connectionconnection_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
 

Detailed Description

Z39.50 connection (low-level client)

Definition in file connection.c.

Function Documentation

int client_prep_connection ( struct client cl,
int  operation_timeout,
int  session_timeout,
iochan_man_t  iochan_man,
const struct timeval *  abstime 
)
static int connection_connect ( struct connection con,
iochan_man_t  iochan_man 
)
static
void connection_continue ( 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
static void connection_destroy ( struct connection co)
static
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 void connection_handler ( IOCHAN  iochan,
int  event 
)
static
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 int connection_use ( int  delta)
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 void iochan_update ( struct connection co)
static
static void non_block_events ( struct connection co)
static

Variable Documentation

YAZ_MUTEX g_mutex = 0
static

Definition at line 51 of file connection.c.

Referenced by connection_use().

int no_connections = 0
static

Definition at line 52 of file connection.c.

Referenced by connection_use().

int total_no_connections = 0
static

Definition at line 53 of file connection.c.

Referenced by connection_use().