Changeset 12 in Main for trunk/Server/tw_config.h
- Timestamp:
- Sep 13, 2024, 10:36:03 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/tw_config.h
r7 r12 6 6 #include <stdint.h> 7 7 8 /* I don't think you would listen to 1024 ports */9 8 #define MAX_PORTS 1024 10 9 11 struct tw_config_entry {}; 10 #define MAX_VHOSTS 1024 11 12 struct tw_config_entry { 13 char* name; 14 int port; 15 char* sslkey; 16 char* sslcert; 17 }; 12 18 13 19 struct tw_config { 14 20 uint64_t ports[MAX_PORTS + 1]; /* If port & (1 << 32) is non-zero, it is SSL */ 21 char hostname[1025]; 15 22 struct tw_config_entry root; 23 struct tw_config_entry vhosts[MAX_VHOSTS]; 24 int vhost_count; 16 25 }; 17 26 18 27 void tw_config_init(void); 19 28 int tw_config_read(const char* path); 29 struct tw_config_entry* tw_vhost_match(const char* name, int port); 20 30 21 31 #endif
Note:
See TracChangeset
for help on using the changeset viewer.