YAZ 5.38.1
comstack Struct Reference

Public endpoint state and transport dispatch table. More...

#include <comstack.h>

Data Fields

CS_TYPE type
int cerrno
int iofile
void * cprivate
int max_recv_bytes
int state
int newfd
int flags
unsigned io_pending
int event
enum oid_proto protocol
int(*) f_put (COMSTACK handle, char *buf, int size)
int(*) f_get (COMSTACK handle, char **buf, int *bufsize)
int(*) f_more (COMSTACK handle)
int(*) f_connect (COMSTACK handle, void *address)
int(*) f_rcvconnect (COMSTACK handle)
int(*) f_bind (COMSTACK handle, void *address, int mode)
int(*) f_listen (COMSTACK h, char *raddr, int *addrlen, int(*check_ip)(void *cd, const char *a, int len, int type), void *cd)
COMSTACK(*) f_accept (COMSTACK handle)
void(*) f_close (COMSTACK handle)
const char *(*) f_addrstr (COMSTACK handle)
void *(*) f_straddr (COMSTACK handle, const char *str)
int(*) f_set_blocking (COMSTACK handle, int blocking)
void * user

Detailed Description

Public endpoint state and transport dispatch table.

Transport implementations maintain these members. Applications may use user for their own data; use the API operations to change transport state. cprivate must only be interpreted after checking type.

Definition at line 64 of file comstack.h.

Field Documentation

◆ cerrno

int comstack::cerrno

◆ cprivate

◆ event

int comstack::event

Last recorded event (CS_NONE, CS_CONNECT, etc.); see cs_look.

Definition at line 89 of file comstack.h.

Referenced by cs_look(), tcpip_accept(), tcpip_bind(), tcpip_connect(), tcpip_put(), tcpip_rcvconnect(), tcpip_type(), unix_accept(), unix_bind(), unix_connect(), unix_put(), unix_rcvconnect(), and unix_type().

◆ f_accept

COMSTACK(*) comstack::f_accept(COMSTACK handle)

Transport implementation of cs_accept.

Definition at line 122 of file comstack.h.

Referenced by tcpip_type(), and unix_type().

◆ f_addrstr

const char *(*) comstack::f_addrstr(COMSTACK handle)

Transport implementation of cs_addrstr.

Definition at line 126 of file comstack.h.

Referenced by tcpip_type(), and unix_type().

◆ f_bind

int(*) comstack::f_bind(COMSTACK handle, void *address, int mode)

Transport implementation of cs_bind.

Definition at line 112 of file comstack.h.

Referenced by tcpip_type(), and unix_type().

◆ f_close

void(*) comstack::f_close(COMSTACK handle)

Transport implementation of cs_close.

Definition at line 124 of file comstack.h.

Referenced by tcpip_type(), and unix_type().

◆ f_connect

int(*) comstack::f_connect(COMSTACK handle, void *address)

Transport implementation of cs_connect.

Definition at line 108 of file comstack.h.

Referenced by tcpip_type(), and unix_type().

◆ f_get

int(*) comstack::f_get(COMSTACK handle, char **buf, int *bufsize)

Transport implementation of cs_get.

Definition at line 104 of file comstack.h.

Referenced by tcpip_type(), and unix_type().

◆ f_listen

int(*) comstack::f_listen(COMSTACK h, char *raddr, int *addrlen, int(*check_ip)(void *cd, const char *a, int len, int type), void *cd)

Transport implementation of cs_listen.

Definition at line 118 of file comstack.h.

Referenced by tcpip_type(), and unix_type().

◆ f_more

int(*) comstack::f_more(COMSTACK handle)

Transport implementation of cs_more.

Definition at line 106 of file comstack.h.

Referenced by tcpip_type(), and unix_type().

◆ f_put

int(*) comstack::f_put(COMSTACK handle, char *buf, int size)

Transport implementation of cs_put.

Definition at line 102 of file comstack.h.

Referenced by tcpip_type(), and unix_type().

◆ f_rcvconnect

int(*) comstack::f_rcvconnect(COMSTACK handle)

Transport implementation of cs_rcvconnect.

Definition at line 110 of file comstack.h.

Referenced by tcpip_type(), and unix_type().

◆ f_set_blocking

int(*) comstack::f_set_blocking(COMSTACK handle, int blocking)

Transport implementation of cs_set_blocking.

Definition at line 130 of file comstack.h.

Referenced by tcpip_type(), and unix_type().

◆ f_straddr

void *(*) comstack::f_straddr(COMSTACK handle, const char *str)

Transport implementation of cs_straddr.

Definition at line 128 of file comstack.h.

Referenced by tcpip_type(), and unix_type().

◆ flags

int comstack::flags

◆ io_pending

unsigned comstack::io_pending

◆ iofile

◆ max_recv_bytes

int comstack::max_recv_bytes

Maximum receive size in bytes; see cs_set_max_recv_bytes.

Definition at line 70 of file comstack.h.

Referenced by cs_set_max_recv_bytes(), tcpip_get(), tcpip_type(), unix_get(), and unix_type().

◆ newfd

int comstack::newfd

Accepted socket held between cs_listen and cs_accept.

Definition at line 86 of file comstack.h.

Referenced by tcpip_accept(), tcpip_listen(), unix_accept(), and unix_listen().

◆ protocol

enum oid_proto comstack::protocol

Application protocol, such as PROTO_Z3950 or PROTO_HTTP.

Definition at line 100 of file comstack.h.

Referenced by do_connect_host(), tcpip_addrstr(), tcpip_straddr(), tcpip_type(), and unix_type().

◆ state

◆ type

◆ user

void* comstack::user

Application-owned data; cs_close does not free it.

Definition at line 131 of file comstack.h.

Referenced by add_listener(), new_session(), tcpip_type(), and unix_type().


The documentation for this struct was generated from the following file: