CBS_HTTPMole Class Reference

An HTTP mole, this class is design to communicate with a client browser. More...

Inheritance diagram for CBS_HTTPMole:

Inheritance graph
[legend]
Collaboration diagram for CBS_HTTPMole:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CBS_HTTPMole (CBS_Trace *pTrace, LPCTSTR lpTitle)
 DECLARE_BS_GENERAL_DRIVE_FUNCTIONS (CBS_HTTPMole, CBS_Mole)
virtual BOOL ReadyToGo ()
virtual ~CBS_HTTPMole ()

Protected Member Functions

virtual BOOL CheckClientAccess (PSOCKADDR_IN ca)
virtual BOOL DoServer ()

Protected Attributes

LPVOID m_lpHTTPMoleData
 Private member for internal use.

Detailed Description

An HTTP mole, this class is design to communicate with a client browser.

Author:
Dror Otmi
Date:
12.07.2003
Version:
V 1.0 Initial version
The HTTP Mole allows extern connection from a browser to the running application. See also base class CBS_Mole.


Constructor & Destructor Documentation

CBS_HTTPMole::CBS_HTTPMole CBS_Trace pTrace,
LPCTSTR  lpTitle
 

The only Constructor.

Parameters:
pTrace The trace for the extern manipulation.
lpTitle The titel of the HTML page.

CBS_HTTPMole::~CBS_HTTPMole  )  [virtual]
 

Destructor.

Returns:


Member Function Documentation

BOOL CBS_HTTPMole::CheckClientAccess PSOCKADDR_IN  sa  )  [protected, virtual]
 

This virtual member allow the application to check the client connection. Returning FALSE will close the connection and TRUE will preceed processing. This implementation writes the client address to the trace (as an information report) and return TRUE.

Note:
An application must override this function in order to achieve authorized connection.
This implementation will NOT block unauthorized client from connecting the server!!! If this function return FALSE the connection will be terminated.
Parameters:
sa The client detail.
Returns:
Always TRUE.

Reimplemented from CBS_Mole.

Reimplemented in CBS_HTTPSMole.

CBS_HTTPMole::DECLARE_BS_GENERAL_DRIVE_FUNCTIONS CBS_HTTPMole  ,
CBS_Mole 
 

Declares LPCTSTR GetClassName( ), virtual LPCTSTR GetBaseClassName( ) and BOOL IsKindOf( LPCTSTR pCmp ) for CBS_HTTPMole.

BOOL CBS_HTTPMole::DoServer  )  [protected, virtual]
 

The implementation of the HTTP Server.

Returns:
TRUE if the request was retrieved and the response was sent.

Reimplemented from CBS_Mole.

Reimplemented in CBS_HTTPSMole.

BOOL CBS_HTTPMole::ReadyToGo  )  [virtual]
 

A virtual function that will be invoke before the mole starts listening. An application could reject or accept the mole startup by overriding this function.

Returns:
This implementation return always TRUE.

Reimplemented from CBS_Mole.

Reimplemented in CBS_HTTPSMole.

Bitspot AG


Bitspot AG
Rietlistrasse 1
CH-6345 Neuheim

Bitspot AG Logo

Phone:

+41 41 755 11 22

Fax:

+41 41 755 11 31

e-mail:

mail@bitspot.com

Web:

www.bitspot.com