Master UDP listener on the Server.
More...
#include <UdpMasterListener.h>
List of all members.
Detailed Description
Master UDP listener on the Server.
This creates a server that will listen on the well know port (the server port) and will spawn JackTrip threads into the Thread pool. Clients request a connection.
Constructor & Destructor Documentation
UdpMasterListener::UdpMasterListener |
( |
int |
server_port = gServerUdpPort |
) |
|
UdpMasterListener::~UdpMasterListener |
( |
|
) |
[virtual] |
Member Function Documentation
void UdpMasterListener::bindUdpSocket |
( |
QUdpSocket & |
udpsocket, |
|
|
int |
port | |
|
) |
| | [static, private] |
Binds a QUdpSocket. It chooses the available (active) interface.
- Parameters:
-
| udpsocket | a QUdpSocket |
| port | Port number |
void UdpMasterListener::ClientAddressSet |
( |
|
) |
[signal] |
int UdpMasterListener::isNewAddress |
( |
uint32_t |
address, |
|
|
uint16_t |
port | |
|
) |
| | [private] |
Check if address is already handled, if not add to array.
- Parameters:
-
- Returns:
- -1 if address is busy, id number if not
- Todo:
- Add the port number in the comparison, i.e., compart IP/port pair
void UdpMasterListener::Listening |
( |
|
) |
[signal] |
int UdpMasterListener::releasePort |
( |
int |
id |
) |
|
- Todo:
- Check if we really need to return an argument here
void UdpMasterListener::run |
( |
|
) |
|
Implements the Thread Loop. To start the thread, call start() ( DO NOT CALL run() ).
- Todo:
- Get number of channels in the client from header
- Todo:
- Add the port number in the comparison
void UdpMasterListener::sendToPoolPrototype |
( |
int |
id |
) |
[private] |
- Todo:
- temp default to 1 channel
void UdpMasterListener::stop |
( |
|
) |
[inline] |
Stops the execution of the Thread.
void UdpMasterListener::testRecieve |
( |
|
) |
[inline, private, slot] |
Member Data Documentation
Active addresses pool numbers (32 bits IPv4 numbers).
Class that will be used as prototype.
Boolean stop the execution of the thread.
Number of Threads running in the pool.
The documentation for this class was generated from the following files: