class
ComterpHandler
: public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
(Return to index)
handler to invoke
ComTerp
on socket (version with ACE)
Type:
Instantiable
Base Classes:
public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
Derived Classes
Include file:
ComTerp/comhandler.h
Description:
= Initialization and termination methods.
Public:
ComterpHandler
(
ComTerpServ
* serv=NULL)
virtual int
close
(u_long)
close handler hook.
ComTerpServ
*
comterp
()
return associated
ComTerpServ
pointer.
virtual void
destroy
(void)
Ensure dynamic allocation. = Hooks for opening and closing handlers.
static int
logger_mode
()
return flag that indicates comterp is in logging-only mode
static void
logger_mode
(int flag)
set flag to put comterp in logging mode, where commands are echoed to stdout without executing
virtual int
open
(void *)
open handler hook.
FILE*
rdfptr
()
file pointer for reading from handle
static ACE_Reactor*
reactor_singleton
()
alternate way of getting at reactor singleton = Demultiplexing hooks.
const char*
timeoutscript
()
return text of commands to execute every timeout.
void
timeoutscript
(const char*)
install new text of commands to execute every timeout.
int
timeoutscriptid
()
return symbol id of text of commands to execute every timeout.
void
timeoutscriptid
(int)
set symbol id of text of commands to execute every timeout.
int
timeoutseconds
()
return timeout period in seconds.
void
timeoutseconds
(int seconds)
set timeout period in seconds.
FILE*
wrfptr
()
file pointer for writing to handle
virtual
~ComterpHandler
()
Protected:
static int
_logger_mode
mode for logging commands: 0 = no log, 1 = log only
FILE*
_rdfptr
file pointer for reading from handle
int
_seconds
timeout in seconds
int
_timeoutscriptid
command for timeoutscript execution
FILE*
_wrfptr
file pointer for writing to handle
ComTerpServ
*
comterp_
private local comterp server
virtual int
handle_input
(ACE_HANDLE)
called when input ready on ACE_HANDLE.
virtual int
handle_timeout
(const ACE_Time_Value &tv, const void *arg)
called when timer goes off.
char
peer_name_[MAXHOSTNAMELEN
Host
we are connected to.
(more documentation)