source: Main/trunk/Server/tw_config.h@ 16

Last change on this file since 16 was 12, checked in by Nishi, on Sep 13, 2024 at 10:36:03 PM

vhost works

  • Property svn:keywords set to Id
File size: 574 bytes
Line 
1/* $Id: tw_config.h 12 2024-09-13 13:36:03Z nishi $ */
2
3#ifndef __TW_CONFIG_H__
4#define __TW_CONFIG_H__
5
6#include <stdint.h>
7
8#define MAX_PORTS 1024
9
10#define MAX_VHOSTS 1024
11
12struct tw_config_entry {
13 char* name;
14 int port;
15 char* sslkey;
16 char* sslcert;
17};
18
19struct tw_config {
20 uint64_t ports[MAX_PORTS + 1]; /* If port & (1 << 32) is non-zero, it is SSL */
21 char hostname[1025];
22 struct tw_config_entry root;
23 struct tw_config_entry vhosts[MAX_VHOSTS];
24 int vhost_count;
25};
26
27void tw_config_init(void);
28int tw_config_read(const char* path);
29struct tw_config_entry* tw_vhost_match(const char* name, int port);
30
31#endif
Note: See TracBrowser for help on using the repository browser.