|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
Watches the network for broadcasts from Advertiser objects, and keeps a list of all the currently active instances. More...
#include "juce_NetworkServiceDiscovery.h"
Public Member Functions | |
| AvailableServiceList (const String &serviceTypeUID, int broadcastPort) | |
| Creates an AvailableServiceList that will bind to the given port number and watch the network for Advertisers broadcasting the given service type. | |
| ~AvailableServiceList () override | |
| Destructor. | |
| std::vector< Service > | getServices () const |
| Returns a list of the currently known services. | |
Public Attributes | |
| std::function< void()> | onChange |
| A lambda that can be set to receive a callback when the list changes. | |
Watches the network for broadcasts from Advertiser objects, and keeps a list of all the currently active instances.
Just create an instance of AvailableServiceList and it will start listening - you can register a callback with its onChange member to find out when services appear/disappear, and you can call getServices() to find out the current list.
@tags{Events}
Definition at line 102 of file juce_NetworkServiceDiscovery.h.
| juce::NetworkServiceDiscovery::AvailableServiceList::AvailableServiceList | ( | const String & | serviceTypeUID, |
| int | broadcastPort | ||
| ) |
Creates an AvailableServiceList that will bind to the given port number and watch the network for Advertisers broadcasting the given service type.
This will only detect broadcasts from an Advertiser object with a matching serviceTypeUID value, and where the broadcastPort matches.
Definition at line 87 of file juce_NetworkServiceDiscovery.cpp.
|
override |
Destructor.
Definition at line 98 of file juce_NetworkServiceDiscovery.cpp.
| std::vector< NetworkServiceDiscovery::Service > juce::NetworkServiceDiscovery::AvailableServiceList::getServices | ( | ) | const |
Returns a list of the currently known services.
Definition at line 128 of file juce_NetworkServiceDiscovery.cpp.
| std::function<void()> juce::NetworkServiceDiscovery::AvailableServiceList::onChange |
A lambda that can be set to receive a callback when the list changes.
Definition at line 117 of file juce_NetworkServiceDiscovery.h.