Subversion Repositories Kolibri OS

Rev

Rev 4206 | Rev 4541 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;                                                                 ;;
  3. ;; Copyright (C) KolibriOS team 2004-2013. All rights reserved.    ;;
  4. ;; Distributed under terms of the GNU General Public License       ;;
  5. ;;                                                                 ;;
  6. ;;  HTTP library for KolibriOS                                     ;;
  7. ;;                                                                 ;;
  8. ;;   Written by hidnplayr@kolibrios.org                            ;;
  9. ;;                                                                 ;;
  10. ;;         GNU GENERAL PUBLIC LICENSE                              ;;
  11. ;;          Version 2, June 1991                                   ;;
  12. ;;                                                                 ;;
  13. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  14.  
  15.  
  16. ; Bitflags for http_msg.flags
  17. FLAG_HTTP11             = 1 shl 0
  18. FLAG_GOT_HEADER         = 1 shl 1
  19. FLAG_GOT_ALL_DATA       = 1 shl 2
  20. FLAG_CONTENT_LENGTH     = 1 shl 3
  21. FLAG_CHUNKED            = 1 shl 4
  22. FLAG_CONNECTED          = 1 shl 5
  23. ; ERROR flags go into the upper word
  24. FLAG_INVALID_HEADER     = 1 shl 16
  25. FLAG_NO_RAM             = 1 shl 17
  26. FLAG_SOCKET_ERROR       = 1 shl 18
  27. FLAG_TIMEOUT_ERROR      = 1 shl 19
  28.  
  29. struc http_msg {
  30.  
  31.         .socket                 dd ?    ; socket on which the actual transfer happens
  32.         .flags                  dd ?    ; flags, reflects status of the transfer using bitflags
  33.         .write_ptr              dd ?    ; internal use only (where to write new data in buffer)
  34.         .buffer_length          dd ?    ; internal use only (number of available bytes in buffer)
  35.         .chunk_ptr              dd ?    ; internal use only (where the next chunk begins)
  36.         .timestamp              dd ?    ; internal use only (when last data was received)
  37.         .status                 dd ?    ; HTTP status
  38.         .header_length          dd ?    ; length of HTTP header
  39.         .content_length         dd ?    ; length of HTTP content
  40.         .content_received       dd ?    ; number of currently received content bytes
  41.         .data:
  42.  
  43. }