FIX: fixed some bugs
ADD: added raw_track message frame
This commit is contained in:
@@ -16,8 +16,11 @@ namespace WHISPER {
|
||||
|
||||
struct localClient{
|
||||
short port;
|
||||
std::string addr;
|
||||
std::uint32_t id;
|
||||
zmq::socket_t clientSocket;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -27,18 +30,35 @@ namespace WHISPER {
|
||||
|
||||
|
||||
private:
|
||||
/// ip address of the destination
|
||||
std::string destinationAdress_;
|
||||
/// my own ipadress
|
||||
std::string myAdress_;
|
||||
/// sending port
|
||||
std::uint16_t port_;
|
||||
/// port wich i bind to
|
||||
std::uint16_t ownReceivingPort_;
|
||||
|
||||
///zeromq io contex
|
||||
zmq::context_t ctx;
|
||||
/// socket for sending
|
||||
zmq::socket_t sender;
|
||||
///shared pointer to receiving socket
|
||||
std::shared_ptr<zmq::socket_t> receiver = nullptr;
|
||||
/// shared pointer to loopback sending socket
|
||||
std::shared_ptr<zmq::socket_t> loopbackSocket = nullptr;
|
||||
/// vector of local udp clients
|
||||
std::list<std::shared_ptr<localClient>> localclients;
|
||||
|
||||
|
||||
std::vector<std::shared_ptr<localClient>> localclients;
|
||||
std::atomic<bool> stopReceiving = false;
|
||||
|
||||
|
||||
/**
|
||||
* @brief checks if the given port is already is use
|
||||
* @param std:uint16 port
|
||||
* @param returns the original port or a new free port
|
||||
*/
|
||||
std::uint16_t checkPort(std::uint16_t port);
|
||||
|
||||
void derivedConnect() override;
|
||||
@@ -48,10 +68,12 @@ namespace WHISPER {
|
||||
void derivedSubscribe(std::string topic) override;
|
||||
void derivedUnsubscribe(std::string topic) override;
|
||||
|
||||
void sendToLocalClients(std::string msg,std::string topic);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
InternalUDPService(std::uint32_t id, SourceType owndevicetype,std::uint16_t port, std::string destinationAdress, std::string myAdress);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user