Panda3D
Classes | Public Member Functions

PStatReader Class Reference

This is the class that does all the work for handling communications from a single Panda client. More...

#include "pStatReader.h"

Inheritance diagram for PStatReader:
ConnectionReader

List of all members.

Classes

class  FrameData

Public Member Functions

 PStatReader (PStatServer *manager, PStatMonitor *monitor)
void close ()
 This will be called by the PStatClientData in response to its close() call.
PStatMonitorget_monitor ()
 Returns the monitor that this reader serves.
void idle ()
 Called each frame to do what needs to be done for the monitor's user-defined idle routines.
void lost_connection ()
 This is called by the PStatServer when it detects that the connection has been lost.
void set_tcp_connection (Connection *tcp_connection)
 This is intended to be called only once, immediately after construction, by the PStatListener that created it.

Detailed Description

This is the class that does all the work for handling communications from a single Panda client.

It reads sockets received from the client and boils them down into PStatData.

Definition at line 44 of file pStatReader.h.


Member Function Documentation

void PStatReader::close ( )

This will be called by the PStatClientData in response to its close() call.

It will tell the server to let go of the reader so it can shut down its connection.

Definition at line 69 of file pStatReader.cxx.

References lost_connection(), and PStatServer::remove_reader().

Referenced by PStatClientData::close().

PStatMonitor * PStatReader::get_monitor ( )

Returns the monitor that this reader serves.

Definition at line 137 of file pStatReader.cxx.

void PStatReader::idle ( )

Called each frame to do what needs to be done for the monitor's user-defined idle routines.

Definition at line 126 of file pStatReader.cxx.

Referenced by PStatServer::poll().

void PStatReader::lost_connection ( )

This is called by the PStatServer when it detects that the connection has been lost.

It should clean itself up and shut down nicely.

Definition at line 108 of file pStatReader.cxx.

References ConnectionManager::close_connection().

Referenced by close(), and PStatServer::poll().

void PStatReader::set_tcp_connection ( Connection tcp_connection)

This is intended to be called only once, immediately after construction, by the PStatListener that created it.

It tells the reader about the newly-established TCP connection to a client.

Definition at line 83 of file pStatReader.cxx.

References ConnectionReader::add_connection(), and PStatServer::get_udp_port().

Referenced by PStatListener::connection_opened().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations