GlobalObjects
|
A class that communicates with a Client or Server via a SOCKET and expects send data of type Message. More...
#include <TcpTransmitter.h>
Public Member Functions | |
Transmitter (SOCKET Socket) | |
virtual | ~Transmitter () |
int | acceptOrder (Message *pTcpMessage) |
virtual void | cancel () override |
Public Member Functions inherited from tcp::ReceiverTransmitter | |
ReceiverTransmitter (SOCKET Socket) | |
virtual | ~ReceiverTransmitter () |
virtual void | finishBreak () override |
int | getPeerName (std::string &rstrIPAdress, unsigned int &ruiPort) const |
SOCKET | Socket () const |
virtual void | takeABreak () override |
Public Member Functions inherited from eut::RepeatingThread | |
RepeatingThread () | |
virtual | ~RepeatingThread () |
int | getBreakCounter () |
bool | isInExclusiveAccess () const |
void | setExclusiveAccess () |
void | signalInput () |
virtual int | start () |
RepeatingThread::STATUS | status () const |
bool | testCancel () |
void | unsetExclusiveAccess () |
void | waitForInput () |
Protected Member Functions | |
Transmitter () | |
virtual void | work () override |
Protected Member Functions inherited from tcp::ReceiverTransmitter | |
ReceiverTransmitter () | |
Protected Member Functions inherited from eut::RepeatingThread | |
ORDER | getOrder () |
STATUS | getStatus () |
void | setStatus (STATUS eStatus) |
void | threadWork () |
void | toOrder (ORDER eOrder) |
Private Member Functions | |
Transmitter (const Transmitter &) | |
Transmitter & | operator= (const Transmitter &) |
Private Attributes | |
std::queue< Message * > | m_MsgQueue |
Additional Inherited Members | |
Public Types inherited from eut::RepeatingThread | |
enum | EuTHREADERROR { EuTHREAD_ERR_NO_THREAD = -10301 , EuTHREAD_ERR_THREAD_ALREADY_WORKING = -10302 , EuTHREAD_ERR_THREAD_BREAK_COUNT_LESS_THAN_ZERO = -10303 , EuTHREAD_ERR_UNKNOWN = -10400 } |
Error range = -10301 to -10400 More... | |
enum | ORDER { eUNDEFINED , eDO_WORK , eEXIT } |
enum | STATUS { eAT_THE_START , eWORKING , ePAUSING , eENDING , eCOMPLETED } |
Public Attributes inherited from eut::RepeatingThread | |
std::string | m_strDebugInfo |
Protected Attributes inherited from tcp::ReceiverTransmitter | |
SOCKET | m_Socket |
A class that communicates with a Client or Server via a SOCKET and expects send data of type Message.
|
protected |
The standard constructor is not available.
tcp::Transmitter::Transmitter | ( | SOCKET | Socket | ) |
Constructor with parameter passing.
[in] | Socket | The socket via which communication takes place. |
eut::ErrorNException | An exception is thrown if an error occurs. |
|
virtual |
Destructor.
|
private |
The copy constructor is not available.
int tcp::Transmitter::acceptOrder | ( | Message * | pTcpMessage | ) |
Includes the message in the list of send messages.
[in] | pTcpMessage | The message to be sent. |
|
overridevirtual |
When the thread ends, this virtual method is called. Here the list of send messages is cleaned up.
Reimplemented from eut::RepeatingThread.
|
private |
The assignment operator is not available.
|
overrideprotectedvirtual |
Sends the data from the send message list to the socket passed in the constructor.
Implements eut::RepeatingThread.
|
private |
The queue with the messages to be sent.