The tracker class. More...
#include <fg_tracker.hxx>
Classes | |
struct | buffsock |
Public Types | |
typedef struct FG_TRACKER::buffsock | buffsock_t |
typedef vMSG::iterator | VI |
typedef std::vector< std::string > | vMSG |
Public Member Functions | |
FG_TRACKER (int port, string server, string m_ServerName, string m_domain) | |
Initialize to standard values. More... | |
~FG_TRACKER () | |
void | AddMessage (const string &message) |
void | buffsock_free (buffsock_t *bs) |
void | CheckTimeout () |
bool | Connect () |
pthread_t | GetThreadID () |
int | GetTrackerPort () |
Return the port no of the tracker. More... | |
string | GetTrackerServer () |
Return the server of the tracker. More... | |
int | Loop () |
void | ReadQueue () |
void | ReplyFromServer () |
void | ReQueueSentMsg () |
void | TrackerRead (buffsock_t *bs) |
int | TrackerWrite (const string &str) |
void | WriteQueue () |
Static Public Member Functions | |
static bool | is_connected () |
static void | set_connected (bool b) |
Public Attributes | |
uint64_t | BytesRcvd |
uint64_t | BytesSent |
pthread_cond_t | condition_var |
time_t | LastConnected |
time_t | LastSeen |
time_t | LastSent |
size_t | LostConnections |
string | m_domain |
string | m_FgmsName |
bool | m_identified |
int | m_PingInterval |
string | m_ProtocolVersion |
int | m_TimeoutStage |
int | m_TrackerPort |
string | m_TrackerServer |
netSocket * | m_TrackerSocket |
pthread_mutex_t | msg_mutex |
vMSG | msg_queue |
pthread_mutex_t | msg_recv_mutex |
vMSG | msg_recv_queue |
pthread_mutex_t | msg_sent_mutex |
vMSG | msg_sent_queue |
pthread_t | MyThreadID |
uint64_t | PktsRcvd |
uint64_t | PktsSent |
bool | WantExit |
Static Public Attributes | |
static bool | m_connected = false |
The tracker class.
Definition at line 61 of file fg_tracker.hxx.
typedef struct FG_TRACKER::buffsock FG_TRACKER::buffsock_t |
typedef vMSG::iterator FG_TRACKER::VI |
Definition at line 81 of file fg_tracker.hxx.
typedef std::vector<std::string> FG_TRACKER::vMSG |
Definition at line 80 of file fg_tracker.hxx.
FG_TRACKER::FG_TRACKER | ( | int | port, |
string | server, | ||
string | m_ServerName, | ||
string | domain | ||
) |
Initialize to standard values.
port | |
server | ip or domain |
fgms | name |
Definition at line 94 of file fg_tracker.cxx.
FG_TRACKER::~FG_TRACKER | ( | ) |
Definition at line 123 of file fg_tracker.cxx.
void FG_TRACKER::AddMessage | ( | const string & | message | ) |
Definition at line 246 of file fg_tracker.cxx.
Referenced by FG_SERVER::UpdateTracker().
void FG_TRACKER::buffsock_free | ( | buffsock_t * | bs | ) |
Definition at line 260 of file fg_tracker.cxx.
Referenced by Loop(), and TrackerRead().
void FG_TRACKER::CheckTimeout | ( | ) |
Definition at line 270 of file fg_tracker.cxx.
Referenced by Loop().
bool FG_TRACKER::Connect | ( | ) |
Definition at line 593 of file fg_tracker.cxx.
Referenced by Loop().
pthread_t FG_TRACKER::GetThreadID | ( | ) |
Definition at line 142 of file fg_tracker.cxx.
Referenced by FG_SERVER::CloseTracker().
|
inline |
Return the port no of the tracker.
int | Port Number |
Definition at line 125 of file fg_tracker.hxx.
Referenced by FG_CLI::cmd_tracker_show(), and FG_SERVER::Init().
|
inline |
Return the server of the tracker.
string | Return tracker server as string |
Definition at line 119 of file fg_tracker.hxx.
Referenced by FG_CLI::cmd_show_version(), FG_CLI::cmd_tracker_show(), FG_SERVER::HandleTelnet(), and FG_SERVER::Init().
|
inlinestatic |
Definition at line 98 of file fg_tracker.hxx.
Referenced by Loop().
int FG_TRACKER::Loop | ( | ) |
Definition at line 474 of file fg_tracker.cxx.
Referenced by detach_tracker().
void FG_TRACKER::ReadQueue | ( | ) |
Definition at line 152 of file fg_tracker.cxx.
Referenced by Loop().
void FG_TRACKER::ReplyFromServer | ( | ) |
Definition at line 413 of file fg_tracker.cxx.
Referenced by TrackerRead().
void FG_TRACKER::ReQueueSentMsg | ( | ) |
Definition at line 227 of file fg_tracker.cxx.
Referenced by Loop(), and ReadQueue().
|
inlinestatic |
Definition at line 97 of file fg_tracker.hxx.
Referenced by CheckTimeout(), FG_TRACKER(), Loop(), signal_handler(), TrackerRead(), and TrackerWrite().
void FG_TRACKER::TrackerRead | ( | buffsock_t * | bs | ) |
Definition at line 303 of file fg_tracker.cxx.
Referenced by Loop().
int FG_TRACKER::TrackerWrite | ( | const string & | str | ) |
Definition at line 368 of file fg_tracker.cxx.
Referenced by CheckTimeout(), Connect(), Loop(), and ReplyFromServer().
void FG_TRACKER::WriteQueue | ( | ) |
Definition at line 193 of file fg_tracker.cxx.
Referenced by ~FG_TRACKER().
uint64_t FG_TRACKER::BytesRcvd |
Definition at line 151 of file fg_tracker.hxx.
Referenced by FG_CLI::cmd_tracker_show(), FG_TRACKER(), and TrackerRead().
uint64_t FG_TRACKER::BytesSent |
Definition at line 150 of file fg_tracker.hxx.
Referenced by FG_CLI::cmd_tracker_show(), FG_TRACKER(), and TrackerWrite().
pthread_cond_t FG_TRACKER::condition_var |
Definition at line 90 of file fg_tracker.hxx.
Referenced by AddMessage(), FG_SERVER::CloseTracker(), Loop(), and ReQueueSentMsg().
time_t FG_TRACKER::LastConnected |
Definition at line 147 of file fg_tracker.hxx.
Referenced by FG_CLI::cmd_tracker_show(), Connect(), and FG_TRACKER().
time_t FG_TRACKER::LastSeen |
Definition at line 148 of file fg_tracker.hxx.
Referenced by CheckTimeout(), FG_CLI::cmd_tracker_show(), FG_TRACKER(), and TrackerRead().
time_t FG_TRACKER::LastSent |
Definition at line 149 of file fg_tracker.hxx.
Referenced by FG_CLI::cmd_tracker_show(), FG_TRACKER(), and TrackerWrite().
size_t FG_TRACKER::LostConnections |
Definition at line 154 of file fg_tracker.hxx.
Referenced by CheckTimeout(), FG_CLI::cmd_tracker_show(), FG_TRACKER(), TrackerRead(), and TrackerWrite().
|
static |
Definition at line 96 of file fg_tracker.hxx.
Referenced by FG_CLI::cmd_tracker_show().
string FG_TRACKER::m_domain |
Definition at line 75 of file fg_tracker.hxx.
Referenced by Connect(), and FG_TRACKER().
string FG_TRACKER::m_FgmsName |
Definition at line 74 of file fg_tracker.hxx.
Referenced by Connect(), and FG_TRACKER().
bool FG_TRACKER::m_identified |
Definition at line 77 of file fg_tracker.hxx.
Referenced by FG_TRACKER(), Loop(), and ReplyFromServer().
int FG_TRACKER::m_PingInterval |
Definition at line 71 of file fg_tracker.hxx.
Referenced by CheckTimeout(), and FG_TRACKER().
string FG_TRACKER::m_ProtocolVersion |
Definition at line 76 of file fg_tracker.hxx.
Referenced by Connect(), FG_TRACKER(), and TrackerWrite().
int FG_TRACKER::m_TimeoutStage |
Definition at line 72 of file fg_tracker.hxx.
Referenced by CheckTimeout(), FG_TRACKER(), Loop(), and TrackerRead().
int FG_TRACKER::m_TrackerPort |
Definition at line 70 of file fg_tracker.hxx.
Referenced by Connect(), and FG_TRACKER().
string FG_TRACKER::m_TrackerServer |
Definition at line 73 of file fg_tracker.hxx.
Referenced by Connect(), and FG_TRACKER().
netSocket* FG_TRACKER::m_TrackerSocket |
Definition at line 78 of file fg_tracker.hxx.
Referenced by Connect(), FG_TRACKER(), TrackerRead(), TrackerWrite(), and ~FG_TRACKER().
pthread_mutex_t FG_TRACKER::msg_mutex |
Definition at line 87 of file fg_tracker.hxx.
Referenced by AddMessage(), Loop(), ReQueueSentMsg(), WriteQueue(), and ~FG_TRACKER().
vMSG FG_TRACKER::msg_queue |
Definition at line 91 of file fg_tracker.hxx.
Referenced by AddMessage(), FG_CLI::cmd_tracker_show(), Loop(), ReQueueSentMsg(), TrackerWrite(), WriteQueue(), and ~FG_TRACKER().
pthread_mutex_t FG_TRACKER::msg_recv_mutex |
Definition at line 89 of file fg_tracker.hxx.
Referenced by Loop().
vMSG FG_TRACKER::msg_recv_queue |
Definition at line 93 of file fg_tracker.hxx.
Referenced by ReplyFromServer(), TrackerRead(), and ~FG_TRACKER().
pthread_mutex_t FG_TRACKER::msg_sent_mutex |
Definition at line 88 of file fg_tracker.hxx.
Referenced by Loop(), ReadQueue(), ReplyFromServer(), ReQueueSentMsg(), TrackerWrite(), and ~FG_TRACKER().
vMSG FG_TRACKER::msg_sent_queue |
Definition at line 92 of file fg_tracker.hxx.
Referenced by Loop(), ReadQueue(), ReplyFromServer(), ReQueueSentMsg(), TrackerWrite(), and ~FG_TRACKER().
pthread_t FG_TRACKER::MyThreadID |
Definition at line 155 of file fg_tracker.hxx.
Referenced by GetThreadID(), and Loop().
uint64_t FG_TRACKER::PktsRcvd |
Definition at line 153 of file fg_tracker.hxx.
Referenced by FG_CLI::cmd_tracker_show(), FG_TRACKER(), and TrackerRead().
uint64_t FG_TRACKER::PktsSent |
Definition at line 152 of file fg_tracker.hxx.
Referenced by FG_CLI::cmd_tracker_show(), FG_TRACKER(), and TrackerWrite().
bool FG_TRACKER::WantExit |
Definition at line 94 of file fg_tracker.hxx.
Referenced by FG_SERVER::CloseTracker(), FG_TRACKER(), and Loop().