Rev 5732 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5732 | Rev 7969 | ||
---|---|---|---|
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2020. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;; HTTP library for KolibriOS ;; |
6 | ;; HTTP library for KolibriOS ;; |
7 | ;; ;; |
7 | ;; ;; |
8 | ;; Written by hidnplayr@kolibrios.org ;; |
8 | ;; Written by hidnplayr@kolibrios.org ;; |
9 | ;; ;; |
9 | ;; ;; |
10 | ;; GNU GENERAL PUBLIC LICENSE ;; |
10 | ;; GNU GENERAL PUBLIC LICENSE ;; |
11 | ;; Version 2, June 1991 ;; |
11 | ;; Version 2, June 1991 ;; |
12 | ;; ;; |
12 | ;; ;; |
13 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
13 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
14 | 14 | ||
15 | 15 | ||
16 | ; Bitflags for http_msg.flags |
16 | ; Bitflags for http_msg.flags |
17 | 17 | ||
18 | ; status |
18 | ; status |
19 | FLAG_HTTP11 = 1 shl 0 |
19 | FLAG_HTTP11 = 1 shl 0 |
20 | FLAG_GOT_HEADER = 1 shl 1 |
20 | FLAG_GOT_HEADER = 1 shl 1 |
21 | FLAG_GOT_ALL_DATA = 1 shl 2 |
21 | FLAG_GOT_ALL_DATA = 1 shl 2 |
22 | FLAG_CONTENT_LENGTH = 1 shl 3 |
22 | FLAG_CONTENT_LENGTH = 1 shl 3 |
23 | FLAG_CHUNKED = 1 shl 4 |
23 | FLAG_CHUNKED = 1 shl 4 |
24 | FLAG_CONNECTED = 1 shl 5 |
24 | FLAG_CONNECTED = 1 shl 5 |
25 | 25 | ||
26 | ; user options |
26 | ; user options |
27 | FLAG_KEEPALIVE = 1 shl 8 |
27 | FLAG_KEEPALIVE = 1 shl 8 |
28 | FLAG_STREAM = 1 shl 9 |
28 | FLAG_STREAM = 1 shl 9 |
29 | FLAG_REUSE_BUFFER = 1 shl 10 |
29 | FLAG_REUSE_BUFFER = 1 shl 10 |
30 | FLAG_BLOCK = 1 shl 11 |
30 | FLAG_BLOCK = 1 shl 11 |
- | 31 | FLAG_RING = 1 shl 12 |
|
31 | 32 | ||
32 | ; error |
33 | ; error |
33 | FLAG_INVALID_HEADER = 1 shl 16 |
34 | FLAG_INVALID_HEADER = 1 shl 16 |
34 | FLAG_NO_RAM = 1 shl 17 |
35 | FLAG_NO_RAM = 1 shl 17 ; alloc failed |
35 | FLAG_SOCKET_ERROR = 1 shl 18 |
36 | FLAG_SOCKET_ERROR = 1 shl 18 |
36 | FLAG_TIMEOUT_ERROR = 1 shl 19 |
37 | FLAG_TIMEOUT_ERROR = 1 shl 19 |
37 | FLAG_TRANSFER_FAILED = 1 shl 20 |
38 | FLAG_TRANSFER_FAILED = 1 shl 20 |
- | 39 | FLAG_NEED_MORE_SPACE = 1 shl 21 ; need more space in existing buffer |
|
38 | 40 | ||
39 | struc http_msg { |
41 | struc http_msg { |
40 | 42 | ||
41 | .socket dd ? ; socket on which the actual transfer happens |
43 | .socket dd ? ; socket on which the actual transfer happens |
42 | .flags dd ? ; flags, reflects status of the transfer using bitflags |
44 | .flags dd ? ; flags, reflects status of the transfer using bitflags |
43 | .write_ptr dd ? ; internal use only (where to write new data in buffer) |
45 | .write_ptr dd ? ; internal use only (where to write new data in buffer) |
44 | .buffer_length dd ? ; internal use only (number of available bytes in buffer) |
46 | .buffer_length dd ? ; internal use only (number of available bytes in buffer) |
45 | .chunk_ptr dd ? ; internal use only (where the next chunk begins) |
47 | .chunk_ptr dd ? ; internal use only (where the next chunk begins) |
46 | .timestamp dd ? ; internal use only (when last data was received) |
48 | .timestamp dd ? ; internal use only (when last data was received) |
47 | 49 | ||
48 | .status dd ? ; HTTP status |
50 | .status dd ? ; HTTP status |
49 | .header_length dd ? ; length of HTTP header |
51 | .header_length dd ? ; length of HTTP header |
50 | .content_ptr dd ? ; ptr to content |
52 | .content_ptr dd ? ; ptr to content |
51 | .content_length dd ? ; total length of HTTP content |
53 | .content_length dd ? ; total length of HTTP content |
52 | .content_received dd ? ; number of currently received content bytes |
54 | .content_received dd ? ; number of currently received content bytes |
53 | 55 | ||
54 | .http_header: |
56 | .http_header: |
55 | 57 | ||
56 | } |
58 | } |