MaServer Class Reference

#include

Inheritance diagram for MaServer:

MprLink List of all members.

Detailed Description

HTTP server possibly listening on multiple ports.

An application may have any number of HTTP servers, each managed by an instance of the Server class. Typically there will be only one server in an application. There may be multiple virtual hosts and one default host for each server class. A server will typically be configured by calling the configure method for each server which parses a file to define the server and virtual host configuration.


Public Member Functions

  MaServer (MaHttp *http, char *name, char *serverRoot)
  ~MaServer ()
int  configure (char *configFile, bool outputConfig)
int  getLine ()
int  start ()
int  stop ()
void  insertAfter (MprLink *item)
void  insertPrior (MprLink *item)

Constructor & Destructor Documentation

MaServer::MaServer MaHttp http,
char *  name,
char *  serverRoot
 

Synopsis:
Constructor to create a HTTP server.
Overview:
Creates a logical HTTP server that may consist of multiple virtual servers.
Parameters:
http  Pointer to the MaHttp object created by maCreateHttp.
name  Descriptive name to give to the server.
serverRoot  Top level path of the directory containing the server.
Stability Classification:
Evolving.
Library:
libappWeb
See also:
~MaServer, configure

MaServer::~MaServer  ) 
 

Destructor.


Member Function Documentation

int MaServer::configure char *  configFile,
bool  outputConfig
 

Synopsis:
configure the entire server from a configuration file.
Overview:
Servers are configured via an Apache-style configuration file. A server may listen on multiple ports and may contain multiple virtual hosts.
Parameters:
configFile  Path of the configuration file.
outputConfig  If TRUE, output the parsed configuration settings to the standard output (console).
Returns:
Returns zero if successful, otherwise a negative MPR error code.

int MaServer::getLine  )  [inline]
 

Synopsis:
Return the current configuration file line number
Overview:
If a error is encountered when parsing the configuration file, getLine will return the current line number for error reporting purposes.
Returns:
The current line number (origin 1).
Stability Classification:
Evolving.
Library:
libappWeb
See also:
configure

void MprLink::insertAfter MprLink item  )  [inline, inherited]
 

Insert after this member.

void MprLink::insertPrior MprLink item  )  [inline, inherited]
 

Insert prior to this member.

int MaServer::start  ) 
 

Synopsis:
Start the server.
Overview:
Call to start all hosts within the server.
Returns:
Returns zero if successful, otherwise return a negative MPR error code.

int MaServer::stop  ) 
 

Synopsis:
Stop the server.
Overview:
Call to stop all hosts within the server.
Returns:
Returns zero if successful, otherwise return a negative MPR error code.

© Mbedthis Software LLC, 2003-2004. All rights reserved. Mbedthis is a trademark of Mbedthis Software LLC.