38 #ifndef __UDPMASTERLISTENER_H__
39 #define __UDPMASTERLISTENER_H__
44 #include <QThreadPool>
46 #include <QHostAddress>
79 std::cout <<
"========= TEST RECEIVE SLOT ===========" << std::endl;
123 #endif //__UDPMASTERLISTENER_H__
QHash< uint32_t, uint16_t > mActiveAddresPortPair
Definition: UdpMasterListener.h:115
int isNewAddress(uint32_t address, uint16_t port)
Check if address is already handled, if not add to array.
Definition: UdpMasterListener.cpp:161
UdpMasterListener(int server_port=gServerUdpPort)
Definition: UdpMasterListener.cpp:50
quint32 uint32_t
Typedef for unsigned int. This type is guaranteed to be 32-bit.
Definition: jacktrip_types.h:69
int mBasePort
Definition: UdpMasterListener.h:113
QThreadPool mThreadPool
The Thread Pool.
Definition: UdpMasterListener.h:110
Master UDP listener on the Server.
Definition: UdpMasterListener.h:58
void Listening()
Definition: moc_UdpMasterListener.cpp:102
volatile bool mStopped
Boolean stop the execution of the thread.
Definition: UdpMasterListener.h:118
JackTripWorker * mJTWorker
Class that will be used as prototype.
Definition: UdpMasterListener.h:109
int mTotalRunningThreads
Number of Threads running in the pool.
Definition: UdpMasterListener.h:119
QUdpSocket mUdpMasterSocket
The UDP socket.
Definition: UdpMasterListener.h:106
void run()
Implements the Thread Loop. To start the thread, call start() ( DO NOT CALL run() ) ...
Definition: UdpMasterListener.cpp:79
void sendToPoolPrototype(int id)
Definition: UdpMasterListener.cpp:133
QHostAddress mPeerAddress
The Peer Address.
Definition: UdpMasterListener.h:107
const int gMaxThreads
Maximum Threads that can be run at the same time.
Definition: jacktrip_globals.h:119
int releasePort(int id)
Definition: UdpMasterListener.cpp:181
virtual ~UdpMasterListener()
Definition: UdpMasterListener.cpp:71
void stop()
Stops the execution of the Thread.
Definition: UdpMasterListener.h:72
Prototype of the worker class that will be cloned through sending threads to the Thread Pool...
Definition: JackTripWorker.h:66
uint32_t mActiveAddress[gMaxThreads][2]
Active addresses pool numbers (32 bits IPv4 numbers)
Definition: UdpMasterListener.h:114
const int gServerUdpPort
Public well-known UDP port to where the clients will connect.
Definition: jacktrip_globals.h:122
void testRecieve()
Definition: UdpMasterListener.h:77
static void bindUdpSocket(QUdpSocket &udpsocket, int port)
Binds a QUdpSocket. It chooses the available (active) interface.
Definition: UdpMasterListener.cpp:144
void ClientAddressSet()
Definition: moc_UdpMasterListener.cpp:108
quint16 uint16_t
Typedef for unsigned short. This type is guaranteed to be 16-bit.
Definition: jacktrip_types.h:67
int mServerPort
Definition: UdpMasterListener.h:112