Panda3D
Public Types | Public Member Functions | Public Attributes | List of all members
PStatServerControlMessage Class Reference

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

#include "pStatServerControlMessage.h"

Public Types

enum  Type { T_invalid, T_hello }
 

Public Member Functions

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

Public Attributes

string _server_hostname
 
string _server_progname
 
Type _type
 
int _udp_port
 

Detailed Description

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

Definition at line 30 of file pStatServerControlMessage.h.

Member Function Documentation

◆ decode()

bool PStatServerControlMessage::decode ( const Datagram datagram)

Extracts the message from the indicated datagram.

Returns true on success, false on error.

Definition at line 60 of file pStatServerControlMessage.cxx.

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

Referenced by encode().

◆ encode()

void PStatServerControlMessage::encode ( Datagram datagram) const

Writes the message into the indicated datagram.

Definition at line 37 of file pStatServerControlMessage.cxx.

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

Referenced by PStatReader::get_monitor().


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