diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-03-13 15:44:31 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-03-13 15:44:31 +0000 |
commit | ff681f7bfd39df83ebc1e84f468b2a42c243fbcf (patch) | |
tree | 5132dfe2dc131333df22129dff203086d5db20a7 /docs/INTERNALS | |
parent | 60bbb64a81d677649dd9593f7f3ae6448cae2143 (diff) |
7.7 beta 2 fixes
Diffstat (limited to 'docs/INTERNALS')
-rw-r--r-- | docs/INTERNALS | 56 |
1 files changed, 37 insertions, 19 deletions
diff --git a/docs/INTERNALS b/docs/INTERNALS index ddba56ee3..37a388614 100644 --- a/docs/INTERNALS +++ b/docs/INTERNALS @@ -7,11 +7,11 @@ INTERNALS - The project is kind of split in two. The library and the client. The client - part uses the library, but the library is meant to be designed to allow other - applications to use it. + The project is split in two. The library and the client. The client part uses + the library, but the library is designed to allow other applications to use + it. - Thus, the largest amount of code and complexity is in the library part. + The largest amount of code and complexity is in the library part. CVS === @@ -35,13 +35,13 @@ Windows vs Unix the same at all places except for the header file that defines them. The macros in use are sclose(), sread() and swrite(). - 2. Windows requires a couple of init calls for the socket stuff + 2. Windows requires a couple of init calls for the socket stuff. Those must be made by the application that uses libcurl, in curl that means src/main.c has some code #ifdef'ed to do just that. 3. The file descriptors for network communication and file operations are - not easily interchangable as in unix + not easily interchangable as in unix. We avoid this by not trying any funny tricks on file descriptors. @@ -51,10 +51,10 @@ Windows vs Unix We set stdout to binary under windows - Inside the source code, I do make an effort to avoid '#ifdef WIN32'. All + Inside the source code, We make an effort to avoid '#ifdef [Your OS]'. All conditionals that deal with features *should* instead be in the format '#ifdef HAVE_THAT_WEIRD_FUNCTION'. Since Windows can't run configure scripts, - I maintain two config-win32.h files (one in / and one in src/) that are + we maintain two config-win32.h files (one in / and one in src/) that are supposed to look exactly as a config.h file would have looked like on a Windows machine! @@ -64,12 +64,6 @@ Windows vs Unix Library ======= - As described elsewhere, libcurl is meant to get two different "layers" of - interfaces. At the present point only the high-level, the "easy", interface - has been fully implemented and documented. We assume the easy-interface in - this description, the low-level interface will be documented when fully - implemented. - There are plenty of entry points to the library, namely each publicly defined function that libcurl offers to applications. All of those functions are rather small and easy-to-follow. All the ones prefixed with 'curl_easy' are @@ -115,6 +109,22 @@ Library When completed, the curl_easy_cleanup() should be called to free up used resources. + A quick roundup on internal function sequences (many of these call + protocol-specific function-pointers): + + curl_connect - connects to a remote site and does initial connect fluff + This also checks for an existing connection to the requested site and uses + that one if it is possible. + + curl_do - starts a transfer + curl_transfer() - transfers data + curl_done - ends a transfer + + curl_disconnect - disconnects from a remote site. This is called when the + disconnect is really requested, which doesn't necessarily have to be + exactly after curl_done in case we want to keep the connection open for + a while. + HTTP(S) HTTP offers a lot and is the protocol in curl that uses the most lines of @@ -130,6 +140,14 @@ Library the source by the use of curl_read() for reading and curl_write() for writing data to the remote server. + http_chunks.c contains functions that understands HTTP 1.1 chunked transfer + encoding. + + An interesting detail with the HTTP(S) request, is the add_buffer() series of + functions we use. They append data to one single buffer, and when the + building is done the entire request is sent off in one single write. This is + done this way to overcome problems with flawed firewalls and lame servers. + FTP The Curl_if2ip() function can be used for getting the IP number of a @@ -265,12 +283,12 @@ Memory Debugging deal with resources that might give us problems if we "leak" them. The functions in the memdebug system do nothing fancy, they do their normal function and then log information about what they just did. The logged data - is then analyzed after a complete session, + can then be analyzed after a complete session, - memanalyze.pl is a perl script present only in CVS (not part of the release - archives) that analyzes a log file generated by the memdebug system. It - detects if resources are allocated but never freed and other kinds of errors - related to resource management. + memanalyze.pl is a perl script present only present in CVS (not part of the + release archives) that analyzes a log file generated by the memdebug + system. It detects if resources are allocated but never freed and other kinds + of errors related to resource management. Use -DMALLOCDEBUG when compiling to enable memory debugging. |