sender for bundles
This commit is contained in:
parent
fdf801c962
commit
216a08f100
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "sender.h"
|
||||
#include "bundle.h"
|
||||
|
||||
namespace OSC {
|
||||
|
||||
|
@ -54,6 +55,21 @@ void Sender::send(std::shared_ptr<Message> msg) const
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sender::send
|
||||
* @param elements
|
||||
* @param time
|
||||
*/
|
||||
void Sender::send(std::vector<std::shared_ptr<Message>> elements,
|
||||
std::chrono::time_point<std::chrono::system_clock> time) const
|
||||
{
|
||||
auto msg = std::make_shared<Bundle>();
|
||||
msg->time_tag.setTime(time);
|
||||
msg->elements = elements;
|
||||
send(msg);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sender::setSender
|
||||
* @param cb
|
||||
|
|
|
@ -43,6 +43,9 @@ public:
|
|||
virtual ~Sender();
|
||||
|
||||
void send(std::shared_ptr<Message>) const;
|
||||
void send(std::vector<std::shared_ptr<Message>>,
|
||||
std::chrono::time_point<std::chrono::system_clock>
|
||||
= std::chrono::system_clock::now()) const;
|
||||
std::shared_ptr<void> setSender(const std::function<void(std::shared_ptr<bufferstream>)>);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue