CBS_TelnetMole Class Reference

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

Inheritance diagram for CBS_TelnetMole:

Inheritance graph
[legend]
Collaboration diagram for CBS_TelnetMole:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CBS_TelnetMole (CBS_Trace *pTrace)
 DECLARE_BS_GENERAL_DRIVE_FUNCTIONS (CBS_TelnetMole, CBS_Mole)
virtual BOOL ReadyToGo ()
virtual ~CBS_TelnetMole ()

Protected Member Functions

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

Detailed Description

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

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


Constructor & Destructor Documentation

CBS_TelnetMole::CBS_TelnetMole CBS_Trace pTrace  ) 
 

Constructor.

Parameters:
pTrace The trace for the extern manipulation.

CBS_TelnetMole::~CBS_TelnetMole  )  [virtual]
 

Destructor.

Returns:


Member Function Documentation

BOOL CBS_TelnetMole::CheckClientAccess PSOCKADDR_IN  ca  )  [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:
ca The client detail.
Returns:
Always TRUE.

Reimplemented from CBS_Mole.

CBS_TelnetMole::DECLARE_BS_GENERAL_DRIVE_FUNCTIONS CBS_TelnetMole  ,
CBS_Mole 
 

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

BOOL CBS_TelnetMole::DoServer  )  [protected, virtual]
 

Manage the connection with the client. Gets the command and executes them.

Returns:
TRUE if the session completed successfully.

Reimplemented from CBS_Mole.

BOOL CBS_TelnetMole::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.

DWORD CBS_TelnetMole::SendTraceFile  )  [protected, virtual]
 

Calls the base class to send the content of the current trace file and send a comment that will be displayed on the telnet at the end of the file.

Returns:
SOCKET_ERROR if an error occurred otherwise a none zero value.

Reimplemented from CBS_Mole.

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