#include <NetServerTCP2Destination.h>

Definition at line 29 of file NetServerTCP2Destination.h.
enum NetServerTCP2Destination::HeaderType [protected] |
enum NetServerTCP2Destination::SocketResult [protected] |
Definition at line 76 of file NetServerTCP2Destination.h.
| NetServerTCP2Destination::NetServerTCP2Destination | ( | NetMessageHandler * | incomingMessageHandler, | |
| TCPsocket | socket, | |||
| unsigned int | destinationId | |||
| ) |
Definition at line 98 of file NetServerTCP2Destination.cpp.
References NetOptions::getPacketLogging(), NetOptions::instance(), Logger::log(), outgoingMessageHandler_, packetLogging_, sendRecvThread_, sendRecvThreadFunc(), NetMessageHandler::setMessageHandler(), socket_, and socketSet_.
| NetServerTCP2Destination::~NetServerTCP2Destination | ( | ) | [virtual] |
Definition at line 128 of file NetServerTCP2Destination.cpp.
References NetMessagePool::addToPool(), currentMessage_, destinationId_, S3D::formatStringBuffer(), NetMessagePool::instance(), Logger::log(), outgoingMessages_, packetLogging_, sendRecvThread_, socket_, and socketSet_.
| void NetServerTCP2Destination::printStats | ( | unsigned int | destinationId | ) |
Definition at line 462 of file NetServerTCP2Destination.cpp.
References bytesIn_, bytesOut_, S3D::formatStringBuffer(), Logger::log(), messagesRecieved_, and messagesSent_.
Referenced by NetServerTCP2::destroyDestination().
| void NetServerTCP2Destination::stop | ( | ) | [inline] |
Definition at line 37 of file NetServerTCP2Destination.h.
References stopped_.
Referenced by NetServerTCP2::destroyDestination().
| bool NetServerTCP2Destination::finished | ( | ) | [inline] |
Definition at line 38 of file NetServerTCP2Destination.h.
References finished_.
Referenced by NetServerTCP2::checkClients().
| unsigned int NetServerTCP2Destination::getIpAddress | ( | ) |
Definition at line 158 of file NetServerTCP2Destination.cpp.
References getIpAddressFromSocket(), and socket_.
Referenced by NetServerTCP2::addDestination(), checkIncoming(), NetServerTCP2::destroyDestination(), and processMessage().
| unsigned int NetServerTCP2Destination::getIpAddressFromSocket | ( | TCPsocket | socket | ) | [static] |
| void NetServerTCP2Destination::addMessage | ( | NetMessage * | message | ) | [inline] |
Definition at line 43 of file NetServerTCP2Destination.h.
References NetMessageHandler::addMessage(), and outgoingMessageHandler_.
Referenced by NetServerTCP2::processMessage().
| void NetServerTCP2Destination::processMessage | ( | NetMessage & | message | ) | [virtual] |
Implements NetMessageHandlerI.
Definition at line 250 of file NetServerTCP2Destination.cpp.
References NetBuffer::allocate(), destinationId_, S3D::formatStringBuffer(), NetBuffer::getBuffer(), NetMessage::getBuffer(), NetMessage::getDestinationId(), getIpAddress(), NetMessagePool::instance(), Logger::log(), outgoingMessages_, packetLogging_, NetMessage::SentMessage, and NetBuffer::setBufferUsed().
| NetServerTCP2Destination::SocketResult NetServerTCP2Destination::checkIncoming | ( | ) | [protected] |
Definition at line 276 of file NetServerTCP2Destination.cpp.
References NetBuffer::addDataToBuffer(), NetMessageHandler::addMessage(), NetMessage::BufferMessage, bytesIn_, currentMessage_, currentMessageLen_, currentMessagePart_, currentMessageType_, destinationId_, S3D::formatStringBuffer(), NetBuffer::getBuffer(), NetMessage::getBuffer(), NetBuffer::getBufferUsed(), NetInterface::getBytesIn(), NetBufferReader::getFromBuffer(), getIpAddress(), incomingMessageHandler_, NetMessagePool::instance(), Logger::log(), messagesRecieved_, packetLogging_, NetBuffer::reset(), SDLNet_TCP_Recv_Wrapper(), socket_, SocketActivity, SocketClosed, SocketEmpty, socketSet_, TypeLast, and TypeMessage.
Referenced by actualSendRecvFunc().
| NetServerTCP2Destination::SocketResult NetServerTCP2Destination::checkOutgoing | ( | ) | [protected] |
Definition at line 377 of file NetServerTCP2Destination.cpp.
References NetMessageHandler::addMessage(), bytesOut_, currentMessageSentLen_, destinationId_, S3D::formatStringBuffer(), NetBuffer::getBuffer(), NetMessage::getBuffer(), NetBuffer::getBufferUsed(), NetInterface::getBytesOut(), incomingMessageHandler_, Logger::log(), messagesSent_, outgoingMessages_, packetLogging_, SDLNet_TCP_Send_Wrapper(), sendHeader(), socket_, SocketActivity, SocketClosed, SocketEmpty, TypeLast, and TypeMessage.
Referenced by actualSendRecvFunc().
| int NetServerTCP2Destination::sendRecvThreadFunc | ( | void * | c | ) | [static, protected] |
Definition at line 174 of file NetServerTCP2Destination.cpp.
References actualSendRecvFunc(), and finished_.
Referenced by NetServerTCP2Destination().
| void NetServerTCP2Destination::actualSendRecvFunc | ( | ) | [protected] |
Definition at line 183 of file NetServerTCP2Destination.cpp.
References checkIncoming(), checkOutgoing(), destinationId_, S3D::formatStringBuffer(), Clock::getTimeDifference(), Logger::log(), outgoingMessageHandler_, packetLogging_, NetMessageHandler::processMessages(), SocketClosed, SocketEmpty, and stopped_.
Referenced by sendRecvThreadFunc().
| bool NetServerTCP2Destination::sendHeader | ( | char | headerType, | |
| int | len | |||
| ) | [protected] |
Definition at line 433 of file NetServerTCP2Destination.cpp.
References NetBuffer::addToBuffer(), NetMessagePool::addToPool(), NetMessage::BufferMessage, bytesOut_, destinationId_, S3D::formatStringBuffer(), NetBuffer::getBuffer(), NetMessage::getBuffer(), NetBuffer::getBufferUsed(), NetInterface::getBytesOut(), NetMessagePool::instance(), Logger::log(), SDLNet_TCP_Send_Wrapper(), and socket_.
Referenced by checkOutgoing().
bool NetServerTCP2Destination::packetLogging_ [protected] |
Definition at line 59 of file NetServerTCP2Destination.h.
Referenced by actualSendRecvFunc(), checkIncoming(), checkOutgoing(), NetServerTCP2Destination(), processMessage(), and ~NetServerTCP2Destination().
unsigned int NetServerTCP2Destination::destinationId_ [protected] |
Definition at line 60 of file NetServerTCP2Destination.h.
Referenced by actualSendRecvFunc(), checkIncoming(), checkOutgoing(), processMessage(), sendHeader(), and ~NetServerTCP2Destination().
SDL_Thread* NetServerTCP2Destination::sendRecvThread_ [protected] |
Definition at line 61 of file NetServerTCP2Destination.h.
Referenced by NetServerTCP2Destination(), and ~NetServerTCP2Destination().
TCPsocket NetServerTCP2Destination::socket_ [protected] |
Definition at line 62 of file NetServerTCP2Destination.h.
Referenced by checkIncoming(), checkOutgoing(), getIpAddress(), NetServerTCP2Destination(), sendHeader(), and ~NetServerTCP2Destination().
SDLNet_SocketSet NetServerTCP2Destination::socketSet_ [protected] |
Definition at line 63 of file NetServerTCP2Destination.h.
Referenced by checkIncoming(), NetServerTCP2Destination(), and ~NetServerTCP2Destination().
NetMessage* NetServerTCP2Destination::currentMessage_ [protected] |
Definition at line 65 of file NetServerTCP2Destination.h.
Referenced by checkIncoming(), and ~NetServerTCP2Destination().
int NetServerTCP2Destination::currentMessageLen_ [protected] |
char NetServerTCP2Destination::currentMessageType_ [protected] |
int NetServerTCP2Destination::currentMessageSentLen_ [protected] |
unsigned int NetServerTCP2Destination::messagesSent_ [protected] |
Definition at line 69 of file NetServerTCP2Destination.h.
Referenced by checkOutgoing(), and printStats().
unsigned int NetServerTCP2Destination::messagesRecieved_ [protected] |
Definition at line 69 of file NetServerTCP2Destination.h.
Referenced by checkIncoming(), and printStats().
unsigned int NetServerTCP2Destination::bytesIn_ [protected] |
Definition at line 70 of file NetServerTCP2Destination.h.
Referenced by checkIncoming(), and printStats().
unsigned int NetServerTCP2Destination::bytesOut_ [protected] |
Definition at line 70 of file NetServerTCP2Destination.h.
Referenced by checkOutgoing(), printStats(), and sendHeader().
bool NetServerTCP2Destination::stopped_ [protected] |
Definition at line 71 of file NetServerTCP2Destination.h.
Referenced by actualSendRecvFunc(), and stop().
bool NetServerTCP2Destination::finished_ [protected] |
Definition at line 71 of file NetServerTCP2Destination.h.
Referenced by finished(), and sendRecvThreadFunc().
Definition at line 72 of file NetServerTCP2Destination.h.
Referenced by actualSendRecvFunc(), addMessage(), and NetServerTCP2Destination().
Definition at line 73 of file NetServerTCP2Destination.h.
Referenced by checkIncoming(), and checkOutgoing().
std::list<NetMessage *> NetServerTCP2Destination::outgoingMessages_ [protected] |
Definition at line 74 of file NetServerTCP2Destination.h.
Referenced by checkOutgoing(), processMessage(), and ~NetServerTCP2Destination().
1.5.3