Panda3D
Loading...
Searching...
No Matches
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.
 
void encode (Datagram &datagram) const
 Writes the message into the indicated datagram.
 

Public Attributes

std::string _server_hostname
 
std::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 27 of file pStatServerControlMessage.h.

Member Enumeration Documentation

◆ Type

enum PStatServerControlMessage::Type

Definition at line 34 of file pStatServerControlMessage.h.

Constructor & Destructor Documentation

◆ PStatServerControlMessage()

PStatServerControlMessage::PStatServerControlMessage ( )

Definition at line 23 of file pStatServerControlMessage.cxx.

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 52 of file pStatServerControlMessage.cxx.

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

◆ encode()

void PStatServerControlMessage::encode ( Datagram & datagram) const

Writes the message into the indicated datagram.

Definition at line 31 of file pStatServerControlMessage.cxx.

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

Member Data Documentation

◆ _server_hostname

std::string PStatServerControlMessage::_server_hostname

Definition at line 42 of file pStatServerControlMessage.h.

◆ _server_progname

std::string PStatServerControlMessage::_server_progname

Definition at line 43 of file pStatServerControlMessage.h.

◆ _type

Type PStatServerControlMessage::_type

Definition at line 39 of file pStatServerControlMessage.h.

◆ _udp_port

int PStatServerControlMessage::_udp_port

Definition at line 44 of file pStatServerControlMessage.h.


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