X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fcomstack.xml;h=65e3d1d5f1465075660ad566bc870c052257e062;hb=095bd74d0cc1cfd3bd4123da0a5fbeafbd1462ce;hp=e9516969020cd032fec80ec9057dfb240506e291;hpb=d940392c53c32ccf76fb287cc5b997b9e921a431;p=yaz-moved-to-github.git
diff --git a/doc/comstack.xml b/doc/comstack.xml
index e951696..65e3d1d 100644
--- a/doc/comstack.xml
+++ b/doc/comstack.xml
@@ -2,55 +2,61 @@
Synopsis (blocking mode)
-
+
@@ -142,7 +148,7 @@ if (buf)
- int cs_close(COMSTACK handle);
+ void cs_close(COMSTACK handle);
@@ -398,7 +404,7 @@ if (buf)
- char *cs_addrstr(COMSTACK);
+ const char *cs_addrstr(COMSTACK);
@@ -454,7 +460,7 @@ if (buf)
- char *cs_addrstr(COMSTACK h);
+ const char *cs_addrstr(COMSTACK h);
@@ -541,55 +547,52 @@ if (buf)
- When a function (including the data exchange functions) reports an
- error condition, use the function
- cs_errno() to determine the cause of the
- problem. The function
+ The error code for the COMSTACK can be retrieved using C macro
+ cs_errno which will return one
+ of the error codes CSYSERR,
+ CSOUTSTATE,
+ CSNODATA, ...
- void cs_perror(COMSTACK handle char *message);
+ int cs_errno(COMSTACK handle);
- works like perror(2) and prints the
- message argument, along with a system message, to
- stderr. Use the character array
+ You can the textual representation of the error code
+ by using cs_errmsg - which
+ works like strerror(3)
- extern const char *cs_errlist[];
+ const char *cs_errmsg(int n);
-
+
- to get hold of the message, if you want to process it differently.
- The function
+ It is also possible to get straight to the textual represenataion
+ without the error code by using
+ cs_strerror.
-
+
- const char *cs_stackerr(COMSTACK handle);
+ const char *cs_strerror(COMSTACK h);
-
-
- Returns an error message from the lower layer, if one has been
- provided.
-
+
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);
@@ -607,21 +610,14 @@ if (buf)
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);
+]]>