Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

STL WebServer

, 8 May 2000
A set of classes written in STL that implement a web server
#if !defined(HttpServerStats_H)
#define HttpServerStats_H

#include "TextFile.h"
#include "HttpRequest.h"

#include <vector>
using namespace std;

#pragma warning( disable:4800 )

// types of status counters

// HttpServerStats
// Purpose:		http server statistics

class HttpServerStats

	bool			_logging;			// shows if logging results
	vector<long>	_stats;				// stats for server by status group
	int				_numberOfHits;		// total hits
	TextFile		_logFile;			// log file for server stats


	HttpServerStats ();
	virtual ~HttpServerStats ();

	// create release
	bool create  ();
	void release ();

	// status methods
	void    reset			();
	void    hit				( HttpRequest & request );
	void    getStats		( HttpRequest & request );

	// logging methods
	bool getLogging ()
		return _logging;

	void setLogging ( bool set )
		_logging = set;



By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

David Hubbard

United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150414.1 | Last Updated 9 May 2000
Article Copyright 2000 by David Hubbard
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid