#include <yaz/comstack.h>
#include <yaz/tcpip.h> /* this is for TCP/IP and SSL support */
#include <yaz/unix.h> /* this is for UNIX socket support */
COMSTACK cs_create(CS_TYPE type, int flags, int protocol);
COMSTACK cs_createbysocket(int s, CS_TYPE type, int flags,
int protocol);
COMSTACK cs_create_host(const char *vhost, int flags, void **vp);
COMSTACK cs_create_host_proxy(const char *vhost, int flags, void **vp,
const char *proxy_host);
COMSTACK cs_create_host2(const char *vhost, int flags, void **vp,
const char *proxy_host, int *proxy_mode);
int cs_parse_host(const char *uri, const char **host, CS_TYPE *t,
enum oid_proto *proto, char **connect_host);
void cs_get_host_args(const char *type_and_host, const char **args);
int cs_bind(COMSTACK handle, int mode);
int cs_connect(COMSTACK handle, void *address);
int cs_rcvconnect(COMSTACK handle);
int cs_listen(COMSTACK handle);
COMSTACK cs_accept(COMSTACK handle);
int cs_put(COMSTACK handle, char *buf, int len);
int cs_get(COMSTACK handle, char **buf, int *size);
int cs_more(COMSTACK handle);
void cs_close(COMSTACK handle);
int cs_look(COMSTACK handle);
int cs_get_error(COMSTACK handle, const char **details);
void *cs_straddr(COMSTACK handle, const char *str);
const char *cs_addrstr(COMSTACK h);