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

Last change on this file since 127 was 43, checked in by Nishi, on Sep 18, 2024 at 6:19:03 PM

add NO_SSL

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