Go to the documentation of this file.
38 #ifndef __UDPHUBLISTENER_H__
39 #define __UDPHUBLISTENER_H__
45 #include <QThreadPool>
47 #include <QHostAddress>
81 void stop() { mStopped =
true; }
92 { std::cout <<
"========= TEST RECEIVE SLOT ===========" << std::endl; }
105 static void bindUdpSocket(QUdpSocket& udpsocket,
int port);
107 uint16_t readClientUdpPort(QTcpSocket* clientConnection);
108 int sendUdpPort(QTcpSocket* clientConnection,
int udp_port);
121 int isNewAddress(QString address,
uint16_t port);
126 int getPoolID(QString address,
uint16_t port);
132 QVector<JackTripWorker*>* mJTWorkers;
133 QThreadPool mThreadPool;
139 QHash<QString, uint16_t> mActiveAddressPortPair;
142 volatile bool mStopped;
143 int mTotalRunningThreads;
146 int mBufferQueueLength;
148 bool m_connectDefaultAudioPorts;
153 void connectMesh(
bool spawn);
154 void enumerateRunningThreadIDs();
156 void setWAIR(
int b) {mWAIR = b;}
157 bool isWAIR() {
return mWAIR;}
159 void connectPatch(
bool spawn);
170 #endif //__UDPHUBLISTENER_H__
void run()
Implements the Thread Loop. To start the thread, call start() ( DO NOT CALL run() )
Definition: UdpHubListener.cpp:122
unsigned int getHubPatch()
Definition: UdpHubListener.h:163
void ClientAddressSet()
Definition: moc_UdpHubListener.cpp:166
void stop()
Stops the execution of the Thread.
Definition: UdpHubListener.h:81
unsigned int mHubPatch
Definition: UdpHubListener.h:161
quint16 uint16_t
Typedef for unsigned short. This type is guaranteed to be 16-bit.
Definition: jacktrip_types.h:71
Hub UDP listener on the Server.
Definition: UdpHubListener.h:69
QString address
Definition: UdpHubListener.h:59
void setConnectDefaultAudioPorts(bool connectDefaultAudioPorts)
Definition: UdpHubListener.h:85
void signalRemoveThread(int id)
Definition: moc_UdpHubListener.cpp:172
void setHubPatch(unsigned int p)
Definition: UdpHubListener.h:162
Class to set usage options and parse settings from input.
Definition: Settings.h:56
Prototype of the worker class that will be cloned through sending threads to the Thread Pool.
Definition: JackTripWorker.h:68
UdpHubListener(int server_port=gServerUdpPort, int server_udp_port=NULL)
Definition: UdpHubListener.cpp:56
virtual ~UdpHubListener()
Definition: UdpHubListener.cpp:105
int releaseThread(int id)
Definition: UdpHubListener.cpp:453
void setUnderRunMode(JackTrip::underrunModeT UnderRunMode)
Definition: UdpHubListener.h:165
int16_t port
Definition: UdpHubListener.h:60
underrunModeT
Enum for the JackTrip Underrun Mode, when packets.
Definition: JackTrip.h:90
const int gServerUdpPort
Public well-known UDP port to where the clients will connect.
Definition: jacktrip_globals.h:145
const int gMaxThreads
Maximum Threads that can be run at the same time.
Definition: jacktrip_globals.h:142
void setBufferQueueLength(int BufferQueueLength)
Definition: UdpHubListener.h:166
Settings * getSettings() const
Definition: UdpHubListener.h:88
Definition: UdpHubListener.h:58
void setSettings(Settings *s)
Definition: UdpHubListener.h:87
qint16 int16_t
Typedef for signed short. This type is guaranteed to be 16-bit.
Definition: jacktrip_types.h:80
void Listening()
Definition: moc_UdpHubListener.cpp:160