SPAOP
|
A StreamMulticaster forwards any OSC messages that are sent to its StreamInPort to a multicast group. More...
#include <StreamMulticaster.h>
Public Member Functions | |
StreamMulticaster (const std::string &sourceHost, const std::string &sourcePort, const std::string &mcGroup, const std::string &mcPort, const std::string &mcIfaceIp, const std::string &connectPort, const std::string &streamInPort, const std::string &streamName, const uint8_t ttl=VISUAL_MC_TTL) | |
Constructor. More... | |
virtual | ~StreamMulticaster () |
Destructor. More... | |
int | getConnectPort () const |
Returns the port where incoming connect messages may be sent to. More... | |
int | getStreamInPort () const |
Returns the port where the incoming stream is recieved. More... | |
std::string | getStreamSourceHost () const |
Returns the hostname of the stream source (i.e. More... | |
std::string | getStreamSourcePort () const |
Returns the port of the stream source (i.e. More... | |
std::string | getMulticastGroup () const |
Returns the IP of the multicast group. More... | |
std::string | getMulticastPort () const |
Returns the port of the multicast group. More... | |
std::string | getMulticastIface () const |
Returns the interface identifier for the network interface used for sending to the multicast group. More... | |
Static Public Member Functions | |
static int | main (const std::string &cWonderAddr="", const std::string &type="visual") |
A function that starts a StreamMulticaster-instance. More... | |
A StreamMulticaster forwards any OSC messages that are sent to its StreamInPort to a multicast group.
Its purpose is to connect to one of WONDER's OSC "streams" ("visual" / "timer" / "render" / "score") and forward the stream to multiple recievers.
Two threads listen on two ports:
wonderlo::StreamMulticaster::StreamMulticaster | ( | const std::string & | sourceHost, |
const std::string & | sourcePort, | ||
const std::string & | mcGroup, | ||
const std::string & | mcPort, | ||
const std::string & | mcIfaceIp, | ||
const std::string & | connectPort, | ||
const std::string & | streamInPort, | ||
const std::string & | streamName, | ||
const uint8_t | ttl = VISUAL_MC_TTL |
||
) |
Constructor.
sourceHost | The hostname/IP of cWONDER. |
sourcePort | The port of cWONDER. |
mcGroup | The IP of the multicast group that the stream shall be forwarded to. |
mcPort | The port of the multicast group that the stream shall be forwarded to. |
mcIfaceIp | The IP of the local interface where the multicast messages shall be sent from. |
connectPort | The port to be used for incoming /WONDER/stream/streamName/connect messages. |
streamInPort | The port to be used for recieving the incoming stream. |
streamName | The name of the stream that shall be forwarded. As of WONDER version 3.1.0, this can be "visual", "timer", "render" or "score". |
ttl | The time-to-live value for the messages sent to the multicast group. |
|
virtual |
Destructor.
int wonderlo::StreamMulticaster::getConnectPort | ( | ) | const |
Returns the port where incoming connect messages may be sent to.
std::string wonderlo::StreamMulticaster::getMulticastGroup | ( | ) | const |
Returns the IP of the multicast group.
std::string wonderlo::StreamMulticaster::getMulticastIface | ( | ) | const |
Returns the interface identifier for the network interface used for sending to the multicast group.
std::string wonderlo::StreamMulticaster::getMulticastPort | ( | ) | const |
Returns the port of the multicast group.
int wonderlo::StreamMulticaster::getStreamInPort | ( | ) | const |
Returns the port where the incoming stream is recieved.
std::string wonderlo::StreamMulticaster::getStreamSourceHost | ( | ) | const |
Returns the hostname of the stream source (i.e.
cWONDER).
std::string wonderlo::StreamMulticaster::getStreamSourcePort | ( | ) | const |
Returns the port of the stream source (i.e.
cWONDER).
|
static |
A function that starts a StreamMulticaster-instance.
Network-addresses are used as defined in WonderHeader.h, the address of cWONDER can be passed as parameter. This is meant as an OS-independent main function (to be called from the "real" main).
cWonderAddr | A string of the format "ip:port" that will be used as the address for cWONDER. If an empty string is passed, the default address from WonderHeader.h will be used. |
type | The type of the stream to be forwarded ("visual" / "timer" / "render" / "score") |