Project

General

Profile

Actions

Feature #2702

closed

WServer Constructor with Configuration

Added by I. Lazaridis almost 11 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Roel Standaert
Target version:
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.

Actions #1

Updated by Koen Deforche almost 11 years ago

  • Status changed from New to InProgress
  • Assignee set to Roel Standaert
  • Target version set to 3.3.3
Actions #2

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.
Actions #3

Updated by Koen Deforche over 10 years ago

  • Target version changed from 3.3.3 to 3.3.4
Actions #4

Updated by Roel Standaert over 10 years ago

  • Status changed from InProgress to Resolved
Actions #5

Updated by Koen Deforche about 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF