Panda3D
Public Types | Public Member Functions | Public Attributes | List of all 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"

Public Types

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

Public Member Functions

bool decode (const Datagram &datagram, PStatClientVersion *version)
 Extracts the message from the indicated datagram. More...
 
void encode (Datagram &datagram) const
 Writes the message into the indicated datagram. More...
 

Public Attributes

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

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 30 of file pStatClientControlMessage.h.

Member Function Documentation

◆ decode()

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 74 of file pStatClientControlMessage.cxx.

References DatagramIterator::get_remaining_size(), DatagramIterator::get_string(), DatagramIterator::get_uint16(), and DatagramIterator::get_uint8().

◆ encode()

void PStatClientControlMessage::encode ( Datagram datagram) const

Writes the message into the indicated datagram.

Definition at line 33 of file pStatClientControlMessage.cxx.

References Datagram::add_string(), Datagram::add_uint16(), Datagram::add_uint8(), and Datagram::clear().


The documentation for this class was generated from the following files: