Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PStatClientControlMessage Class Reference

This kind of message is sent from the client to the server on the TCP socket to establish critical control information. More...

#include <pStatClientControlMessage.h>

List of all members.

Public Types

enum  Type {
  T_datagram = 0, T_hello, T_define_collectors, T_define_threads,
  T_invalid
}

Public Member Functions

 PStatClientControlMessage ()
void encode (Datagram &datagram) const
 Writes the message into the indicated datagram.

bool decode (const Datagram &datagram, PStatClientVersion *version)
 Extracts the message from the indicated datagram.


Public Attributes

Type _type
string _client_hostname
string _client_progname
int _major_version
int _minor_version
pvector< PStatCollectorDef * > _collectors
int _first_thread_index
pvector< string > _names


Detailed Description

This kind of message is sent from the client to the server on the TCP socket to establish critical control information.

Definition at line 45 of file pStatClientControlMessage.h.


Member Enumeration Documentation

enum PStatClientControlMessage::Type
 

Enumeration values:
T_datagram 
T_hello 
T_define_collectors 
T_define_threads 
T_invalid 

Definition at line 52 of file pStatClientControlMessage.h.


Constructor & Destructor Documentation

PStatClientControlMessage::PStatClientControlMessage  ) 
 

Definition at line 37 of file pStatClientControlMessage.cxx.

References _client_hostname, _client_progname, _major_version, _type, Datagram::add_string(), Datagram::add_uint16(), Datagram::add_uint8(), Datagram::clear(), and T_hello.


Member Function Documentation

bool PStatClientControlMessage::decode const Datagram datagram,
PStatClientVersion version
 

Extracts the message from the indicated datagram.

Returns true on success, false on error.

Definition at line 97 of file pStatClientControlMessage.cxx.

References _major_version, and _minor_version.

void PStatClientControlMessage::encode Datagram datagram  )  const
 

Writes the message into the indicated datagram.

Definition at line 50 of file pStatClientControlMessage.cxx.

References _collectors, and T_define_collectors.


Member Data Documentation

string PStatClientControlMessage::_client_hostname
 

Definition at line 63 of file pStatClientControlMessage.h.

Referenced by PStatClientControlMessage().

string PStatClientControlMessage::_client_progname
 

Definition at line 64 of file pStatClientControlMessage.h.

Referenced by PStatClientControlMessage().

pvector<PStatCollectorDef *> PStatClientControlMessage::_collectors
 

Definition at line 69 of file pStatClientControlMessage.h.

Referenced by encode().

int PStatClientControlMessage::_first_thread_index
 

Definition at line 72 of file pStatClientControlMessage.h.

int PStatClientControlMessage::_major_version
 

Definition at line 65 of file pStatClientControlMessage.h.

Referenced by decode(), and PStatClientControlMessage().

int PStatClientControlMessage::_minor_version
 

Definition at line 66 of file pStatClientControlMessage.h.

Referenced by decode().

pvector<string> PStatClientControlMessage::_names
 

Definition at line 73 of file pStatClientControlMessage.h.

Type PStatClientControlMessage::_type
 

Definition at line 60 of file pStatClientControlMessage.h.

Referenced by PStatClientControlMessage().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:54:29 2003 for Panda by doxygen1.3