void Start() { // start discoverability, telling people who know discoveryIdentifier about OSCPort myBeacon = new BeaconLib.Beacon(discoveryIdentifier, OSCPort); myBeacon.BeaconData = ""; myBeacon.Start(); // start OSC listener on port OSCPort // define the callback SharpOSC.HandleOscPacket listenerCallback = delegate(SharpOSC.OscPacket packet) { // get message SharpOSC.OscMessage messageReceived = (SharpOSC.OscMessage)packet; // send message along to be processed on the main thread in Update() myOSCIncomingMessages.Enqueue(Tuple.Create(messageReceived.Address, messageReceived.Arguments)); }; // tell the callback our hidden action ListenForMessage("/___broadcastToMePlease___", RespondToNewListener); // set up the callback myListener = new SharpOSC.UDPListener(OSCPort, listenerCallback); }
void Start() { myBeacon = new BeaconLib.Beacon(discoveryIdentifier, communicationPort); myBeacon.BeaconData = otherData; myBeacon.Start(); }