X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Fcomstack.xml;h=846b50729cc1275b6def23daa5c542fce8b3673f;hb=5ef9ca5de57e415b34c21fe0d17a79f7b8e6b636;hp=fe2d937086bf504738d8132de1cbe5b6cad5c62e;hpb=c91efbe35fe8ff53aeafedf0ffb8f1b90841ecdc;p=yaz-moved-to-github.git
diff --git a/doc/comstack.xml b/doc/comstack.xml
index fe2d937..846b507 100644
--- a/doc/comstack.xml
+++ b/doc/comstack.xml
@@ -20,25 +20,30 @@
}
server_address_ip = cs_straddr(stack, server_address_str);
- if (!server_address_ip)
- {
+ if (!server_address_ip) {
fprintf(stderr, "cs_straddr: address could not be resolved\n");
return -1;
}
status = cs_connect(stack, server_address_ip);
- if (status != 0) {
+ if (status) {
fprintf(stderr, "cs_connect: %s\n", cs_strerror(stack));
return -1;
}
+ status = cs_rcvconnect(stack);
+ if (status) {
+ fprintf(stderr, "cs_rcvconnect: %s\n", cs_strerror(stack));
+ return -1;
+ }
+
status = cs_put(stack, protocol_package, protocol_package_length);
if (status) {
fprintf(stderr, "cs_put: %s\n", cs_strerror(stack));
return -1;
}
- /* Now get a response */
+ /* Now get a response */
length_incoming = cs_get(stack, &buf, &size);
if (!length_incoming) {
fprintf(stderr, "Connection closed\n");
@@ -54,7 +59,7 @@
/* clean up */
cs_close(stack);
if (buf)
- free(buf);
+ xfree(buf);
return 0;
]]>
@@ -445,10 +450,13 @@
- 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).
@@ -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.