Subversion Repositories Kolibri OS

Rev

Rev 4242 | Rev 4986 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4242 Rev 4541
Line 28... Line 28...
28
This procedure will handle all incoming data for a connection and place it in the buffer.
28
This procedure will handle all incoming data for a connection and place it in the buffer.
29
As long as the procedure expects more data, -1 is returned and the procedure must be called again.
29
As long as the procedure expects more data, -1 is returned and the procedure must be called again.
30
 - When transfer is done, the procedure will return 0. 
30
 - When transfer is done, the procedure will return 0. 
31
 
31
 
Line 32... Line 32...
32
All data is placed together with some flags and other attributes in the http_msg structure.
32
The HTTP header is placed together with some flags and other attributes in the http_msg structure.
33
This structure is defined in http.inc (and not copied here because it might still change.)
33
This structure is defined in http.inc (and not copied here because it might still change.)
34
The identifier used by the functions is actually a pointer to this structure.
34
The identifier used by the functions is actually a pointer to this structure.
35
In the dword named .flags, the library will set various bit-flags indicating the status of the process.
35
In the dword named .flags, the library will set various bit-flags indicating the status of the process.
36
(When a transfer is done, one should check these bit-flags to find out if the transfer was error-free.)
36
(When a transfer is done, one should check these bit-flags to find out if the transfer was error-free.)
37
All received data is placed at the end of this structure, including HTTP headers.
37
The HTTP header is placed at the end of this structure. The content is placed in another buffer.
38
The dword .status contains the status code received from the server (e.g. 200 for OK).
38
The dword .status contains the status code received from the server (e.g. 200 for OK).
39
In header_length you'll find the length of the header as soon as it has been received.
39
In header_length you'll find the length of the header as soon as it has been received.
40
In content_length you'll find the length of the content (not counting headers). 
-
 
41
In content_received, you'll find the number of bytes already received (not counting headers).
-
 
42
40
In content_ptr you'll find a pointer to the actual content.
-
 
41
In content_length you'll find the length of the content. 
-
 
42
In content_received, you'll find the number of content bytes already received.
-
 
43
43
44