Implement HTTP/2 and WebSocket support; remove legacy JavaScript and CSS files
- Added HTTP/2 support in src/http2.c and src/http2.h, including session management, frame handling, and response sending. - Introduced WebSocket functionality in src/websocket.c and src/websocket.h, covering handshake, frame parsing, and message sending. - Created a WebSocket test page (www/websocket-test.html) for client-side interaction. - Removed outdated JavaScript (www/script.js) and CSS (www/style.css) files.
This commit is contained in:
@@ -115,6 +115,14 @@ int load_config(const char *filename, ServerConfig *config) {
|
||||
config->verbose = parse_bool(value);
|
||||
printf("load_config: verbose = %d\n", config->verbose);
|
||||
}
|
||||
else if (strcasecmp(key, "enable_http2") == 0) {
|
||||
config->enable_http2 = parse_bool(value);
|
||||
printf("load_config: enable_http2 = %d\n", config->enable_http2);
|
||||
}
|
||||
else if (strcasecmp(key, "enable_websocket") == 0) {
|
||||
config->enable_websocket = parse_bool(value);
|
||||
printf("load_config: enable_websocket = %d\n", config->enable_websocket);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "Warning: Unknown config option '%s' on line %d\n", key, line_number);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user