#include <ArNetPacketSenderTcp.h>
Public Member Functions | |
ArNetPacketSenderTcp () | |
Constructor. | |
ArSocket * | getSocket (void) |
Gets the socket this sender uses. | |
bool | sendData (void) |
Tries to send the data there is to be sent. | |
void | sendPacket (ArNetPacket *packet) |
Sends a packet. | |
void | setSocket (ArSocket *socket) |
Sets the socket this sender uses. | |
~ArNetPacketSenderTcp () | |
Destructor. | |
Protected Attributes | |
int | myAlreadySent |
const char * | myBuf |
ArMutex | myDataMutex |
int | myLength |
ArNetPacket * | myPacket |
std::list< ArNetPacket * > | myPacketList |
ArSocket * | mySocket |
|
Constructor.
Definition at line 30 of file ArNetPacketSenderTcp.cpp. |
|
Destructor.
Definition at line 40 of file ArNetPacketSenderTcp.cpp. References myPacketList. |
|
Gets the socket this sender uses.
Definition at line 68 of file ArNetPacketSenderTcp.cpp. References mySocket. |
|
Tries to send the data there is to be sent.
Definition at line 83 of file ArNetPacketSenderTcp.cpp. References ArBasePacket::getBuf(), ArNetPacket::getCommand(), ArBasePacket::getLength(), ArMutex::lock(), ArLog::log(), myAlreadySent, myBuf, myDataMutex, myLength, myPacket, myPacketList, mySocket, ArTime::setToNow(), ArMutex::unlock(), and ArSocket::write(). Referenced by ArClientBase::loopOnce(), ArServerClient::shutdown(), ArClientBase::startNonBlockingDisconnect(), and ArServerClient::tcpCallback(). |
|
Sends a packet.
Definition at line 73 of file ArNetPacketSenderTcp.cpp. References ArNetPacket::duplicatePacket(), ArMutex::lock(), myDataMutex, myPacketList, sendPacket(), and ArMutex::unlock(). Referenced by sendPacket(), ArServerClient::sendPacketTcp(), and ArClientBase::sendPacketTcp(). |
|
Sets the socket this sender uses.
Definition at line 57 of file ArNetPacketSenderTcp.cpp. References ArMutex::lock(), myDataMutex, mySocket, and ArMutex::unlock(). Referenced by ArClientBase::ArClientBase(), and ArServerClient::ArServerClient(). |
|
Definition at line 55 of file ArNetPacketSenderTcp.h. Referenced by sendData(). |
|
Definition at line 56 of file ArNetPacketSenderTcp.h. Referenced by sendData(). |
|
Definition at line 51 of file ArNetPacketSenderTcp.h. Referenced by sendData(), sendPacket(), and setSocket(). |
|
Definition at line 57 of file ArNetPacketSenderTcp.h. Referenced by sendData(). |
|
Definition at line 54 of file ArNetPacketSenderTcp.h. Referenced by sendData(). |
|
Definition at line 53 of file ArNetPacketSenderTcp.h. Referenced by sendData(), sendPacket(), and ~ArNetPacketSenderTcp(). |
|
Definition at line 52 of file ArNetPacketSenderTcp.h. Referenced by getSocket(), sendData(), and setSocket(). |