bagder: curl-www/libcurl/hiper API,NONE,1.1 Makefile,1.3,1.4

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www/libcurl/hiper
In directory labb:/tmp/cvs-serv29092

Modified Files:
	Makefile 
Added Files:
	API 
Log Message:
add api and app


--- NEW FILE: API ---
/*
 * Name:    curl_multi_socket() and
 *          curl_multi_socket_all()
 *
 * Desc:    An alternative version of curl_multi_perform() that allows the
 *          application to pass in one of the file descriptors that have been
 *          detected to have "action" on them and let libcurl perform. This
 *          allows libcurl to not have to scan through all possible file
 *          descriptors to check for this. The app is recommended to pass in
 *          the 'easy' argument (or set it to CURL_EASY_NONE) to make libcurl
 *          figure out the internal structure even faster and easier.  If the
 *          easy argument is set to something else than CURL_EASY_NONE, the
 *          's' (socket) argument will be ignored by libcurl.
 *
 *          It also informs the application about updates in the socket (file
 *          descriptor) status by doing none, one or multiple calls to the
 *          curl_socket_callback. It thus updates the status with changes
 *          since the previous time this function was used. If 'callback' is
 *          NULL, no callback will be called. A status change may also be a
 *          new timeout only, having the same IN/OUT status as before.
 *
 *          If a previous wait for socket action(s) timed out, you should call
 *          this function with the socket argument set to
 *          CURL_SOCKET_TIMEOUT. If you want to force libcurl to (re-)check
 *          all its internal sockets, and call the callback with status for
 *          all sockets no matter what the previous state is, you call
 *          curl_multi_socket_all() instead.
 *
 *          curl_multi_perform() is thus the equivalent of calling
 *          curl_multi_socket_all(handle, NULL, NULL);
 *
 *          IMPLEMENTATION: libcurl will need an internal hash table to map
 *          socket numbers to internal easy handles for the cases when 'easy'
 *          is set to CURL_EASY_NONE.
 *
 *          Regarding the timeout argument in the callback: it is the timeout
 *          (in milliseconds) for waiting on action on this socket (and the
 *          given time period starts when the callback is called) until you
 *          should call curl_multi_socket() with the timeout stuff mentioned
 *          above. If "actions" happens on the socket before the timeout
 *          happens, remember that the timout timer keeps ticking until told
 *          otherwise.
 *
 *          The "what" argument has one of five values:
 *
 *            0 CURL_POLL_NONE (0)   - register, not interested in readiness
 *            1 CURL_POLL_IN         - register, interested in read readiness
 *            2 CURL_POLL_OUT        - register, interested in write readiness
 *            3 CURL_POLL_INOUT      - register, interested in both
 *            4 CURL_POLL_REMOVE     - deregister
 */
#define CURL_POLL_NONE   0
#define CURL_POLL_IN     1
#define CURL_POLL_OUT    2
#define CURL_POLL_INOUT  3
#define CURL_POLL_REMOVE 4

#define CURL_EASY_NONE (CURL *)0
#define CURL_EASY_TIMEOUT (CURL *)0
#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD

typedef int (*curl_socket_callback)(CURL *easy,      /* easy handle */
                                    curl_socket_t s, /* socket */
                                    int what,        /* see above */
                                    long ms,         /* timeout for wait */
                                    void *userp);    /* "private" pointer */

CURLMcode curl_multi_socket(CURLM *multi_handle,
                            curl_socket_t s,
                            CURL *easy,
                            curl_socket_callback callback,
                            void *userp); /* passed to callback */

CURLMcode curl_multi_socket_all(CURLM *multi_handle,
                                curl_socket_callback callback,
                                void *userp); /* passed to callback */

/*
 * Name:    curl_multi_timeout()
 *
 * Desc:    Returns the maximum number of milliseconds the app is allowed to
 *          wait before curl_multi_socket() or curl_multi_perform() must be
 *          called (to allow libcurl's timed events to take place).
 *
 * Returns: CURLM error code.
 */
CURLMcode curl_multi_timeout(CURLM *multi_handle, long *milliseconds);


Index: Makefile
===================================================================
RCS file: /cvsroot/curl/curl-www/libcurl/hiper/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile	3 Nov 2005 11:35:22 -0000	1.3
+++ Makefile	4 Nov 2005 08:48:42 -0000	1.4
@@ -7,7 +7,7 @@
 NOW=$(shell gnudate +'-D__TODAY__=%B %d, %Y')
 ACTION=@echo preprocessing $@; rm -f $@; cpp -I.. -I$(ROOT) -WWW -Uunix -P -H -C -V -LL "$(NOW)" $< $@; chmod a-w+r $@
 
-all: index.html schedule.html roadmap.html
+all: index.html schedule.html roadmap.html api.html app.html
 
 index.html: _index.html $(MAINPARTS)
 	$(ACTION)
@@ -17,3 +17,13 @@
 
 roadmap.html: _roadmap.html $(MAINPARTS)
 	$(ACTION)
+
+api.html: _api.html api.t $(MAINPARTS)
+	$(ACTION)
+api.t: API
+	$(TXT2PLAIN) < $< > $@
+
+app.html: _app.html app.t $(MAINPARTS)
+	$(ACTION)
+app.t: app.c
+	$(TXT2PLAIN) < $< > $@
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.