ServerBrowserInfo Class Reference

#include <ServerBrowserInfo.h>

List of all members.

Public Member Functions

bool start ()
void processMessages ()

Static Public Member Functions

static
ServerBrowserInfo
instance ()

Protected Member Functions

void processMessage (UDPpacket *packet)
void processStatusMessage (std::list< std::string > &reply)
void processPlayerMessage (std::list< std::string > &reply)
void processInfoMessage (std::list< std::string > &reply)
std::string addTag (const std::string &name, const std::string &value)

Protected Attributes

UDPsocket udpsock_
UDPpacket ** packetV_
UDPpacket ** packetVOut_

Static Protected Attributes

static
ServerBrowserInfo
instance_ = 0

Private Member Functions

 ServerBrowserInfo ()
virtual ~ServerBrowserInfo ()


Detailed Description

Definition at line 28 of file ServerBrowserInfo.h.


Constructor & Destructor Documentation

ServerBrowserInfo::ServerBrowserInfo (  )  [private]

Definition at line 45 of file ServerBrowserInfo.cpp.

References packetV_, and packetVOut_.

Referenced by instance().

ServerBrowserInfo::~ServerBrowserInfo (  )  [private, virtual]

Definition at line 51 of file ServerBrowserInfo.cpp.


Member Function Documentation

ServerBrowserInfo * ServerBrowserInfo::instance (  )  [static]

Definition at line 36 of file ServerBrowserInfo.cpp.

References instance_, and ServerBrowserInfo().

Referenced by serverLoop(), and serverMain().

bool ServerBrowserInfo::start (  ) 

Definition at line 55 of file ServerBrowserInfo.cpp.

References ScorchedServer::instance(), and udpsock_.

void ServerBrowserInfo::processMessages (  ) 

Definition at line 62 of file ServerBrowserInfo.cpp.

References NetInterface::getBytesIn(), NetInterface::getBytesOut(), NetInterface::getPings(), int(), next, packetV_, packetVOut_, processInfoMessage(), processPlayerMessage(), processStatusMessage(), LangStringUtil::strlen(), and udpsock_.

Referenced by serverLoop().

void ServerBrowserInfo::processMessage ( UDPpacket *  packet  )  [protected]

void ServerBrowserInfo::processStatusMessage ( std::list< std::string > &  reply  )  [protected]

Definition at line 137 of file ServerBrowserInfo.cpp.

References addTag(), S3D::formatStringBuffer(), ScorchedContext::getGameState(), ScorchedContext::getOptionsGame(), S3D::getOSDesc(), TankContainer::getPlayingTanks(), GameState::getState(), Tank::getTankAI(), ScorchedContext::getTankContainer(), ScorchedServer::instance(), S3D::ScorchedProtocolVersion, S3D::ScorchedVersion, ServerState::ServerStateTooFewPlayers, snprintf, and LangStringUtil::strcmp().

Referenced by processMessages().

void ServerBrowserInfo::processPlayerMessage ( std::list< std::string > &  reply  )  [protected]

Definition at line 207 of file ServerBrowserInfo.cpp.

References addTag(), LangStringUtil::convertFromLang(), S3D::formatStringBuffer(), TankContainer::getPlayingTanks(), TankScore::getRank(), Tank::getScore(), TankScore::getScoreString(), Tank::getTankAI(), ScorchedContext::getTankContainer(), Target::getTargetName(), Tank::getTeam(), TankColorGenerator::getTeamName(), TankScore::getTimePlayedString(), ScorchedServer::instance(), and snprintf.

Referenced by processMessages().

void ServerBrowserInfo::processInfoMessage ( std::list< std::string > &  reply  )  [protected]

Definition at line 186 of file ServerBrowserInfo.cpp.

References addTag(), OptionEntry::DataDepricated, OptionEntry::DataProtected, OptionEntry::getData(), OptionEntry::getName(), ScorchedContext::getOptionsGame(), OptionEntry::getValueAsString(), and ScorchedServer::instance().

Referenced by processMessages().

std::string ServerBrowserInfo::addTag ( const std::string name,
const std::string value 
) [protected]

Definition at line 243 of file ServerBrowserInfo.cpp.

References S3D::formatStringBuffer(), and XMLNode::removeSpecialChars().

Referenced by processInfoMessage(), processPlayerMessage(), and processStatusMessage().


Member Data Documentation

ServerBrowserInfo * ServerBrowserInfo::instance_ = 0 [static, protected]

Definition at line 37 of file ServerBrowserInfo.h.

Referenced by instance().

UDPsocket ServerBrowserInfo::udpsock_ [protected]

Definition at line 38 of file ServerBrowserInfo.h.

Referenced by processMessages(), and start().

UDPpacket** ServerBrowserInfo::packetV_ [protected]

Definition at line 39 of file ServerBrowserInfo.h.

Referenced by processMessages(), and ServerBrowserInfo().

UDPpacket** ServerBrowserInfo::packetVOut_ [protected]

Definition at line 40 of file ServerBrowserInfo.h.

Referenced by processMessages(), and ServerBrowserInfo().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:06 2009 for Scorched3D by  doxygen 1.5.3