2#include <ossia/detail/mutex.hpp>
4#include <ossia/network/base/listening.hpp>
5#include <ossia/network/base/protocol.hpp>
6#include <ossia/network/minuit/detail/minuit_name_table.hpp>
7#include <ossia/network/value/value.hpp>
8#include <ossia/network/zeroconf/zeroconf.hpp>
28struct osc_1_0_outbound_stream_visitor;
33 using lock_type = lock_t;
37 const std::string& local_name,
const std::string& remote_ip, uint16_t remote_port,
40 minuit_protocol(
const minuit_protocol&) =
delete;
41 minuit_protocol(minuit_protocol&&) =
delete;
42 minuit_protocol& operator=(
const minuit_protocol&) =
delete;
43 minuit_protocol& operator=(minuit_protocol&&) =
delete;
49 const std::string& get_ip()
const;
50 minuit_protocol& set_ip(std::string);
52 uint16_t get_remote_port()
const;
53 minuit_protocol& set_remote_port(uint16_t);
55 uint16_t get_local_port()
const;
56 minuit_protocol& set_local_port(uint16_t);
62 std::future<void> pull_async(parameter_base&)
override;
71 void namespace_refresh(std::string_view req,
const std::string& addr);
72 void namespace_refreshed(std::string_view addr);
75 get_refresh(std::string_view req,
const std::string& addr, std::promise<void>&& p);
76 void get_refreshed(std::string_view req);
79 ossia::minuit::name_table name_table;
82 void on_received_message(
83 const oscpack::ReceivedMessage& m,
const oscpack::IpEndpointName& ip);
85 void update_zeroconf();
87 std::string m_localName;
89 uint16_t m_remotePort{};
90 uint16_t m_localPort{};
93 listened_parameters m_listening;
95 std::promise<void> m_namespaceFinishedPromise;
98 mutex_t m_nsRequestMutex;
99 ossia::hash_set<std::string> m_nsRequests;
101 mutex_t m_getRequestMutex;
102 ossia::string_map<std::promise<void>> m_getRequests;
104 std::unique_ptr<osc::sender<osc_1_0_outbound_stream_visitor>> m_sender;
105 std::unique_ptr<osc::receiver> m_receiver;
107 zeroconf_server m_zcServer;
109 message_origin_identifier m_id;
111 std::atomic<long long> m_lastSentMessage;
112 std::atomic<long long> m_lastRecvMessage;
The sender class.
Definition sender.hpp:27
Root of a device tree.
Definition ossia/network/base/device.hpp:58
The node_base class.
Definition node.hpp:48
The parameter_base class.
Definition ossia/network/base/parameter.hpp:48
The protocol_base class.
Definition protocol.hpp:40
The value class.
Definition value.hpp:173
Full information about a parameter.
Definition parameter_data.hpp:61