X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=doc%2Fcomstack.xml;h=846b50729cc1275b6def23daa5c542fce8b3673f;hp=8538a145bdf4b4c6567231f734a31cbaf904b957;hb=e33389ee14d909d3a1b9874a40aa1b53c3fe42be;hpb=4e50eccc10dbfb82098c72089c3b840813b71505 diff --git a/doc/comstack.xml b/doc/comstack.xml index 8538a14..846b507 100644 --- a/doc/comstack.xml +++ b/doc/comstack.xml @@ -1,7 +1,7 @@ The COMSTACK Module - + Synopsis (blocking mode) - + @@ -74,7 +79,7 @@ of losing generality, and it may prove that the interface will need extension later on. - + There hasn't been interest in the XTImOSI stack for some years. @@ -111,20 +116,20 @@ COMSTACK cs_create(CS_TYPE type, int blocking, int protocol); - + Creates an instance of the protocol stack - a communications endpoint. The type parameter determines the mode of communication. At present the following values are supported: - + tcpip_type TCP/IP (BER over TCP/IP or HTTP over TCP/IP) ssl_type - Secure Socket Layer (SSL). This COMSTACK + Secure Socket Layer (SSL). This COMSTACK is experimental and is not fully implemented. If HTTP is used, this effectively is HTTPS. @@ -136,7 +141,7 @@ - + The cs_create function returns a null-pointer if a system error occurs. @@ -148,7 +153,7 @@ - int cs_close(COMSTACK handle); + void cs_close(COMSTACK handle); @@ -404,7 +409,7 @@ - char *cs_addrstr(COMSTACK); + const char *cs_addrstr(COMSTACK); @@ -445,22 +450,25 @@ - For TCP/IP and SSL transport modes, the special hostname "@" - is mapped to any local address - (the manifest constant INADDR_ANY). - It is used to establish local listening endpoints in the server role. + For TCP/IP and SSL, the special hostnames @, + maps to IN6ADDR_ANY_INIT with + IPV4 binding as well (bindv6only=0), + The special hostname @4 binds to + INADDR_ANY (IPV4 only listener). + The special hostname @6 binds to + IN6ADDR_ANY_INIT with bindv6only=1 (IPV6 only listener). For UNIX sockets, the format of an address is the socket filename. - + When a connection has been established, you can use - char *cs_addrstr(COMSTACK h); + const char *cs_addrstr(COMSTACK h); @@ -488,9 +496,8 @@ function cs_create. The third parameter vp is a pointer to &comstack; stack type specific values. - For SSL (ssl_type) vp is an already create - OpenSSL CTX. For TCP/IP and UNIX vp - is unused (can be set to NULL. + Parameter vp is reserved for future use. + Set it to NULL. @@ -535,7 +542,7 @@ - + Diagnostics @@ -567,40 +574,39 @@ const char *cs_errmsg(int n); - + It is also possible to get straight to the textual represenataion - without the error code by using + without the error code by using cs_strerror. - + const char *cs_strerror(COMSTACK h); - + Summary and Synopsis - - #include <yaz/comstack.h> - - #include <yaz/tcpip.h> /* this is for TCP/IP and SSL support */ - #include <yaz/unix.h> /* this is for UNIX sockeL support */ - - + + + #include /* this is for TCP/IP and SSL support */ + #include /* this is for UNIX socket support */ + COMSTACK cs_create(CS_TYPE type, int blocking, int protocol); - + COMSTACK cs_createbysocket(int s, CS_TYPE type, int blocking, int protocol); - COMSTACK cs_create_host (const char *str, int blocking, - void **vp); - + COMSTACK cs_create_host(const char *str, int blocking, + void **vp); + 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); @@ -611,21 +617,14 @@ int cs_more(COMSTACK handle); - int cs_close(COMSTACK handle); + void cs_close(COMSTACK handle); int cs_look(COMSTACK handle); void *cs_straddr(COMSTACK handle, const char *str); - char *cs_addrstr(COMSTACK h); - - extern int cs_errno; - - void cs_perror(COMSTACK handle char *message); - - const char *cs_stackerr(COMSTACK handle); - - extern const char *cs_errlist[]; + const char *cs_addrstr(COMSTACK h); +]]>