#include <ClientKeepAliveSender.h>
Public Member Functions | |
| void | sendKeepAlive () |
Static Public Member Functions | |
| static ClientKeepAliveSender * | instance () |
Protected Member Functions | |
| void | send () |
Static Protected Member Functions | |
| static int | sendThreadFunc (void *) |
Protected Attributes | |
| unsigned int | lastSendTime_ |
| SDL_Thread * | sendThread_ |
| bool | recvMessage_ |
| NetBuffer | buffer_ |
Static Protected Attributes | |
| static ClientKeepAliveSender * | instance_ = 0 |
Private Member Functions | |
| ClientKeepAliveSender () | |
| virtual | ~ClientKeepAliveSender () |
Definition at line 26 of file ClientKeepAliveSender.h.
| ClientKeepAliveSender::ClientKeepAliveSender | ( | ) | [private] |
Definition at line 41 of file ClientKeepAliveSender.cpp.
References buffer_, NetBuffer::compressBuffer(), ComsKeepAliveMessage::writeMessage(), and ComsMessage::writeTypeMessage().
| ClientKeepAliveSender::~ClientKeepAliveSender | ( | ) | [private, virtual] |
Definition at line 50 of file ClientKeepAliveSender.cpp.
| ClientKeepAliveSender * ClientKeepAliveSender::instance | ( | ) | [static] |
Definition at line 32 of file ClientKeepAliveSender.cpp.
References instance_.
Referenced by ClientProcessingLoop::simulate().
| void ClientKeepAliveSender::sendKeepAlive | ( | ) |
Definition at line 54 of file ClientKeepAliveSender.cpp.
References S3D::formatStringBuffer(), ScorchedClient::instance(), int(), lastSendTime_, Logger::log(), sendThread_, and sendThreadFunc().
Referenced by ClientProcessingLoop::simulate().
| int ClientKeepAliveSender::sendThreadFunc | ( | void * | ) | [static, protected] |
Definition at line 77 of file ClientKeepAliveSender.cpp.
References instance_, and send().
Referenced by sendKeepAlive().
| void ClientKeepAliveSender::send | ( | ) | [protected] |
Definition at line 87 of file ClientKeepAliveSender.cpp.
References buffer_, NetInterfaceFlags::fAsync, ScorchedContext::getNetInterface(), ScorchedContext::getOptionsGame(), ScorchedClient::instance(), int(), lastSendTime_, Logger::log(), and NetInterface::sendMessageServer().
Referenced by sendThreadFunc().
ClientKeepAliveSender * ClientKeepAliveSender::instance_ = 0 [static, protected] |
Definition at line 34 of file ClientKeepAliveSender.h.
Referenced by instance(), and sendThreadFunc().
unsigned int ClientKeepAliveSender::lastSendTime_ [protected] |
SDL_Thread* ClientKeepAliveSender::sendThread_ [protected] |
bool ClientKeepAliveSender::recvMessage_ [protected] |
Definition at line 38 of file ClientKeepAliveSender.h.
NetBuffer ClientKeepAliveSender::buffer_ [protected] |
Definition at line 39 of file ClientKeepAliveSender.h.
Referenced by ClientKeepAliveSender(), and send().
1.5.3