|
|
| version 1.36, 2025/05/26 00:52:15 | version 1.39, 2026/10/16 13:55:16 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: commonly used functions. | Parser: commonly used functions. |
| Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) | Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) |
| Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru> | Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru> |
| */ | */ |
| Line 22 | Line 22 |
| #ifdef _MSC_VER | #ifdef _MSC_VER |
| #include <windows.h> | #include <windows.h> |
| #define socklen_t int | |
| #else | |
| #define closesocket close | |
| #define INVALID_SOCKET -1 | |
| typedef int SOCKET; | |
| #endif | #endif |
| #ifndef DOXYGEN | #ifndef DOXYGEN |
| Line 113 public: | Line 108 public: |
| bool read_header(); | bool read_header(); |
| size_t read_post(char *, size_t); | size_t read_post(char *, size_t); |
| size_t send_body(const void *, size_t); | size_t send_body(const void *, size_t); |
| /// bytes received after the request headers, not processed yet | |
| String::C unprocessed(); | |
| /// receives up to size bytes, returns 0 if the connection is closed | |
| size_t receive(char *, size_t); | |
| void set_nodelay(); | |
| void set_send_timeout(int timeout_secs); | |
| }; | }; |
| class HTTPD_Server : public PA_Allocated { | class HTTPD_Server : public PA_Allocated { |