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

Last change on this file since 74 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
RevLine 
[16]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
[20]6#include <stdbool.h>
7
[43]8#include "../config.h"
9
[16]10struct tw_http_request {
11 char* method;
12 char* path;
[20]13 char* query;
[16]14 char* version;
15 char** headers;
16 char* body;
17};
18
19struct tw_http_response {
20 char** headers;
[20]21 int status;
22 bool _processed; /* Internal parameter */
[16]23};
24
25#ifdef SOURCE
[43]26#ifndef NO_SSL
[16]27#include <openssl/ssl.h>
[43]28#endif
[32]29void tw_free_request(struct tw_http_request* req);
[43]30#ifndef NO_SSL
[16]31int tw_http_parse(SSL* ssl, int sock, struct tw_http_request* req);
[43]32#else
33int tw_http_parse(void* ssl, int sock, struct tw_http_request* req);
[16]34#endif
[43]35#endif
[16]36
37#endif
Note: See TracBrowser for help on using the repository browser.