Actions
Feature #2702
closedWServer Constructor with Configuration
Start date:
02/23/2014
Due date:
% Done:
0%
Estimated time:
Description
Current:
WServer server(argv[0]);
server.setServerConfiguration(argc, argv, WTHTTPD_CONFIG_FILE);
This can be simplified to:
WServer server(argc, argv, WTHTTPD_CONFIG_FILE);
by simply adding the additional constructor.
Compatibility
The additional constructor would not break any existent code.
Updated by Koen Deforche over 10 years ago
- Status changed from New to InProgress
- Assignee set to Roel Standaert
- Target version set to 3.3.3
Updated by I. Lazaridis over 10 years ago
A small update:
The addition for WRun would be:
int WRun(int argc, char* argv[], ApplicationCreator createApplication,
const std::string& serverConfigurationFile = WTHTTP_CONFIGURATION)
{
[...]
// WTHTTP_CONFIGURATION is e.g. "/etc/wt/wthttpd"
server.setServerConfiguration(argc, argv, serverConfigurationFile );
in analogy, the new constructor for WServer should become:
WServer server(int argc, char* argv[], ApplicationCreator createApplication,
const std::string& serverConfigurationFile = WTHTTP_CONFIGURATION)
Usage:
WRun(argc, argv, createApp, "/my/wthttpd");
WServer server(argc, argv, createApp, "my/wthttp");
[...] (do things with server)
server.run();
where "my/wthttpd" is optional.
Updated by Koen Deforche over 10 years ago
- Target version changed from 3.3.3 to 3.3.4
Updated by Roel Standaert over 10 years ago
- Status changed from InProgress to Resolved
Updated by Koen Deforche about 10 years ago
- Status changed from Resolved to Closed
Actions