source: Main/trunk/Server/tw_http.h@ 301

Last change on this file since 301 was 140, checked in by Nishi, on Sep 23, 2024 at 8:31:18 PM

adding cplusplus thing

  • Property svn:keywords set to Id
File size: 684 bytes
Line 
1/* $Id: tw_http.h 140 2024-09-23 11:31:18Z nishi $ */
2
3#ifndef __TW_HTTP_H__
4#define __TW_HTTP_H__
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#include <stdbool.h>
11
12#include "../config.h"
13
14struct tw_http_request {
15 char* method;
16 char* path;
17 char* query;
18 char* version;
19 char** headers;
20 char* body;
21};
22
23struct tw_http_response {
24 char** headers;
25 int status;
26 bool _processed; /* Internal parameter */
27};
28
29#ifdef SOURCE
30#ifndef NO_SSL
31#include <openssl/ssl.h>
32#endif
33void tw_free_request(struct tw_http_request* req);
34#ifndef NO_SSL
35int tw_http_parse(SSL* ssl, int sock, struct tw_http_request* req);
36#else
37int tw_http_parse(void* ssl, int sock, struct tw_http_request* req);
38#endif
39#endif
40
41#ifdef __cplusplus
42}
43#endif
44
45#endif
Note: See TracBrowser for help on using the repository browser.