Go to the documentation of this file.
38 #ifndef __UDPMASTERLISTENER_H__
39 #define __UDPMASTERLISTENER_H__
45 #include <QThreadPool>
47 #include <QHostAddress>
80 void stop() { mStopped =
true; }
88 { std::cout <<
"========= TEST RECEIVE SLOT ===========" << std::endl; }
101 static void bindUdpSocket(QUdpSocket& udpsocket,
int port)
throw(std::runtime_error);
103 int readClientUdpPort(QTcpSocket* clientConnection);
104 int sendUdpPort(QTcpSocket* clientConnection,
int udp_port);
117 int isNewAddress(QString address,
uint16_t port);
122 int getPoolID(QString address,
uint16_t port);
128 QVector<JackTripWorker*>* mJTWorkers;
129 QThreadPool mThreadPool;
134 QHash<QString, uint16_t> mActiveAddressPortPair;
137 volatile bool mStopped;
138 int mTotalRunningThreads;
141 int mBufferQueueLength;
143 bool m_connectDefaultAudioPorts;
147 void connectMesh(
bool spawn);
148 void enumerateRunningThreadIDs();
150 void setWAIR(
int b) {mWAIR = b;}
151 bool isWAIR() {
return mWAIR;}
153 void connectPatch(
bool spawn);
164 #endif //__UDPMASTERLISTENER_H__
void setConnectDefaultAudioPorts(bool connectDefaultAudioPorts)
Definition: UdpMasterListener.h:84
void ClientAddressSet()
Definition: moc_UdpMasterListener.cpp:167
quint16 uint16_t
Typedef for unsigned short. This type is guaranteed to be 16-bit.
Definition: jacktrip_types.h:71
QString address
Definition: UdpMasterListener.h:58
void setBufferQueueLength(int BufferQueueLength)
Definition: UdpMasterListener.h:160
unsigned int getHubPatch()
Definition: UdpMasterListener.h:157
void setHubPatch(unsigned int p)
Definition: UdpMasterListener.h:156
Prototype of the worker class that will be cloned through sending threads to the Thread Pool.
Definition: JackTripWorker.h:67
void signalRemoveThread(int id)
Definition: moc_UdpMasterListener.cpp:173
int releaseThread(int id)
Definition: UdpMasterListener.cpp:421
UdpMasterListener(int server_port=gServerUdpPort)
Definition: UdpMasterListener.cpp:56
int16_t port
Definition: UdpMasterListener.h:59
underrunModeT
Enum for the JackTrip Underrun Mode, when packets.
Definition: JackTrip.h:90
void run()
Implements the Thread Loop. To start the thread, call start() ( DO NOT CALL run() )
Definition: UdpMasterListener.cpp:111
const int gServerUdpPort
Public well-known UDP port to where the clients will connect.
Definition: jacktrip_globals.h:141
const int gMaxThreads
Maximum Threads that can be run at the same time.
Definition: jacktrip_globals.h:138
void stop()
Stops the execution of the Thread.
Definition: UdpMasterListener.h:80
Master UDP listener on the Server.
Definition: UdpMasterListener.h:67
unsigned int mHubPatch
Definition: UdpMasterListener.h:155
void setUnderRunMode(JackTrip::underrunModeT UnderRunMode)
Definition: UdpMasterListener.h:159
Definition: UdpMasterListener.h:57
qint16 int16_t
Typedef for signed short. This type is guaranteed to be 16-bit.
Definition: jacktrip_types.h:80
virtual ~UdpMasterListener()
Definition: UdpMasterListener.cpp:94
void Listening()
Definition: moc_UdpMasterListener.cpp:161