Changeset 12 in Main for trunk/Server/tw_config.h


Ignore:
Timestamp:
Sep 13, 2024, 10:36:03 PM (2 months ago)
Author:
Nishi
Message:

vhost works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Server/tw_config.h

    r7 r12  
    66#include <stdint.h>
    77
    8 /* I don't think you would listen to 1024 ports */
    98#define MAX_PORTS 1024
    109
    11 struct tw_config_entry {};
     10#define MAX_VHOSTS 1024
     11
     12struct tw_config_entry {
     13        char* name;
     14        int port;
     15        char* sslkey;
     16        char* sslcert;
     17};
    1218
    1319struct tw_config {
    1420        uint64_t ports[MAX_PORTS + 1]; /* If port & (1 << 32) is non-zero, it is SSL */
     21        char hostname[1025];
    1522        struct tw_config_entry root;
     23        struct tw_config_entry vhosts[MAX_VHOSTS];
     24        int vhost_count;
    1625};
    1726
    1827void tw_config_init(void);
    1928int tw_config_read(const char* path);
     29struct tw_config_entry* tw_vhost_match(const char* name, int port);
    2030
    2131#endif
Note: See TracChangeset for help on using the changeset viewer.