You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jf...@apache.org on 2001/07/04 18:59:39 UTC
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_connect.c
jfclere 01/07/04 09:59:39
Modified: jk/native Makefile.am
jk/native/common jk_connect.c
Log:
Add logic and first documentation for scandoc.
Revision Changes Path
1.2 +4 -0 jakarta-tomcat-connectors/jk/native/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile.am 2001/06/05 10:27:47 1.1
+++ Makefile.am 2001/07/04 16:59:36 1.2
@@ -15,3 +15,7 @@
(cd $$i && $(MAKE) $$target) || exit 1; \
fi; \
done;
+
+apidocs: common/*.h
+ ../../scandoc/scandoc.pl -i ../../scandoc/template.pl -p \
+ ./docs/api/ -dproject="mod_jk Library" common/*.h common/*.c
1.3 +31 -6 jakarta-tomcat-connectors/jk/native/common/jk_connect.c
Index: jk_connect.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_connect.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jk_connect.c 2001/06/18 14:15:34 1.2
+++ jk_connect.c 2001/07/04 16:59:38 1.3
@@ -55,17 +55,22 @@
* *
* ========================================================================= */
-/***************************************************************************
- * Description: Socket/Naming manipulation functions *
- * Author: Gal Shachor <sh...@il.ibm.com> *
- * Based on: Various Jserv files *
- * Version: $Revision: 1.2 $ *
- ***************************************************************************/
+/*
+ * Description: Socket/Naming manipulation functions
+ * Based on: Various Jserv files
+ */
+/**
+ * @package jk_connect
+ * @author Gal Shachor <sh...@il.ibm.com>
+ * @version $Revision: 1.3 $
+ */
#include "jk_connect.h"
#include "jk_util.h"
+/** resolve the host IP */
+
int jk_resolve(char *host,
short port,
struct sockaddr_in *rc)
@@ -100,6 +105,7 @@
return JK_TRUE;
}
+/** connect to Tomcat */
int jk_open_socket(struct sockaddr_in *addr,
int ndelay,
@@ -154,6 +160,8 @@
return -1;
}
+/** close the socket */
+
int jk_close_socket(int s)
{
#ifdef WIN32
@@ -169,6 +177,16 @@
return -1;
}
+/** send a long message
+ * @param sd opened socket.
+ * @param b buffer containing the data.
+ * @param len length to send.
+ * @return -2: send returned 0 ? what this that ?
+ * -3: send failed.
+ * >0: total size send.
+ * @bug this fails on Unixes if len is too big for the underlying
+ * protocol.
+ */
int jk_tcp_socket_sendfull(int sd,
const unsigned char *b,
int len)
@@ -193,6 +211,13 @@
return sent;
}
+/** receive len bytes.
+ * @param sd opened socket.
+ * @param b buffer to store the data.
+ * @param len length to receive.
+ * @return -1: receive failed or connection closed.
+ * >0: length of the received data.
+ */
int jk_tcp_socket_recvfull(int sd,
unsigned char *b,
int len)