|
YAZ 5.38.1
|
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 |
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.
| int comstack::cerrno |
Last COMSTACK error code; see cs_get_error.
Definition at line 67 of file comstack.h.
Referenced by cs_get_error(), cs_set_error(), cs_set_error(), cs_set_head_only(), cs_strerror(), do_read(), tcpip_type(), unix_type(), yaz_tcpip_set_head_only(), and yaz_unix_set_head_only().
| void* comstack::cprivate |
Opaque transport-owned state; its layout depends on type.
Definition at line 69 of file comstack.h.
Referenced by connect_and_bind(), cont_connect(), create_net_socket(), cs_get_peer_certificate_x509(), cs_print_session_info(), cs_set_error(), cs_set_ssl_certificate_file(), ssl_type(), tcpip_accept(), tcpip_addrstr(), tcpip_bind(), tcpip_close(), tcpip_connect(), tcpip_get(), tcpip_more(), tcpip_put(), tcpip_rcvconnect(), tcpip_straddr(), tcpip_type(), unix_accept(), unix_addrstr(), unix_bind(), unix_close(), unix_get(), unix_more(), unix_put(), unix_straddr1(), unix_type(), yaz_tcpip_get_error_details(), yaz_tcpip_set_head_only(), and yaz_unix_set_head_only().
| 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().
Transport implementation of cs_accept.
Definition at line 122 of file comstack.h.
Referenced by tcpip_type(), and unix_type().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| int comstack::flags |
Endpoint options, a combination of CS_FLAGS_* bits.
Definition at line 87 of file comstack.h.
Referenced by cont_connect(), create_net_socket(), tcpip_accept(), tcpip_addrstr(), tcpip_connect(), tcpip_get(), tcpip_put(), tcpip_rcvconnect(), tcpip_set_blocking(), tcpip_straddr(), tcpip_type(), unix_accept(), unix_set_blocking(), and unix_type().
| unsigned comstack::io_pending |
Pending I/O directions, a combination of CS_WANT_* bits.
Definition at line 88 of file comstack.h.
Referenced by do_connect_host(), do_write_ex(), ir_read(), ir_session(), new_session(), tcpip_accept(), tcpip_connect(), tcpip_get(), tcpip_put(), tcpip_type(), unix_accept(), unix_connect(), unix_get(), unix_put(), unix_type(), yaz_url_exec(), and ZOOM_connection_do_io().
| int comstack::iofile |
Socket descriptor, or -1 when no socket has been created.
Definition at line 68 of file comstack.h.
Referenced by cont_connect(), create_net_socket(), tcpip_accept(), tcpip_addrstr(), tcpip_bind(), tcpip_close(), tcpip_connect(), tcpip_get(), tcpip_listen(), tcpip_put(), tcpip_rcvconnect(), tcpip_set_blocking(), tcpip_type(), unix_accept(), unix_bind(), unix_close(), unix_connect(), unix_get(), unix_listen(), unix_put(), unix_set_blocking(), and unix_type().
| 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().
| 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().
| 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().
| int comstack::state |
Current connection state (CS_ST_*).
Definition at line 71 of file comstack.h.
Referenced by cont_connect(), tcpip_accept(), tcpip_bind(), tcpip_connect(), tcpip_listen(), tcpip_rcvconnect(), tcpip_straddr(), tcpip_type(), unix_accept(), unix_bind(), unix_connect(), unix_listen(), unix_rcvconnect(), and unix_type().
| CS_TYPE comstack::type |
Transport constructor, identifying the implementation (CS_TYPE).
Definition at line 66 of file comstack.h.
Referenced by cont_connect(), cs_get_peer_certificate_x509(), cs_print_session_info(), cs_set_head_only(), cs_set_ssl_certificate_file(), cs_set_ssl_ctx(), ssl_type(), tcpip_bind(), tcpip_rcvconnect(), tcpip_straddr(), tcpip_type(), unix_type(), yaz_tcpip_get_error_details(), yaz_tcpip_set_head_only(), and yaz_unix_set_head_only().
| 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().