3#if defined(_WIN32) && defined(_MSC_VER)
74 const string&
getIp();
Base exception class for network client exceptions.
void cleanUpSafeMessages()
Clean up safe messages.
static const int MESSAGEACK_RESENDTIMES_TRIES
virtual void run()
Run thread program.
MessageQueue messageQueue
MessageMapSafe messageMapSafe
MessageMapAck messageMapAck
void processAckReceived(const uint32_t messageId)
Processes ack reveived.
queue< UDPClientMessage * > RecvMessageQueue
map< uint32_t, Message * > MessageMapAck
static const uint64_t MESSAGEACK_KEEPTIME
UDPClient(const string &ip, const unsigned int port)
Public constructor.
void processAckMessages()
Process ack messages.
queue< Message * > MessageQueue
void setClientKey(const string &clientKey)
Set client key.
const string & getClientKey()
static const uint64_t MESSAGESSAFE_KEEPTIME
const UDPClient_Statistics getStatistics()
static uint64_t getRetryTime(const uint8_t retries)
Get retry time for given retry count.
UDPClientMessage * createMessage(stringstream *frame)
Create message.
map< uint32_t, SafeMessage * > MessageMapSafe
static const int MESSAGEQUEUE_SEND_BATCH_SIZE
void sendMessage(UDPClientMessage *clientMessage, bool safe)
Pushes a message to be send, takes over ownership of message.
const unsigned int getPort()
Mutex recvMessageQueueMutex
static const uint64_t MESSAGEACK_RESENDTIMES[MESSAGEACK_RESENDTIMES_TRIES]
Mutex messageMapSafeMutex
bool processSafeMessage(UDPClientMessage *clientMessage)
Returns if a message should be processed or already have been processed.
UDPClientMessage * receiveMessage()
Receive message.
UDPClient_Statistics statistics
RecvMessageQueue recvMessageQueue
Interface to kernel event mechanismns.
Class representing a UDP socket.