Exemplo n.º 1
0
    private void Connect()
    {
        IsConnected = false;

        if (OSCMaster.Receivers.ContainsKey(OSCReceiverName))
        {
            OSCMaster.Receivers[OSCReceiverName].messageReceived -= processMessage;
            OSCMaster.RemoveReceiver(OSCReceiverName);
        }

        var receiver = OSCMaster.CreateReceiver(OSCReceiverName, OSCInputPort);

        if (receiver == null)
        {
            return;
        }

        receiver.messageReceived += processMessage;

        IsConnected = true;
    }
Exemplo n.º 2
0
    private void Connect()
    {
        IsConnected = false;

        if (OSCMaster.HasReceiver(OSCReceiverName))
        {
            OSCMaster.Receivers[OSCReceiverName].messageReceived -= processMessage;
            OSCMaster.RemoveReceiver(OSCReceiverName);
        }

        OSCMaster.CreateReceiver(OSCReceiverName, OSCInputPort).messageReceived += processMessage;

        IsConnected = true;

        if (zeroconfServiceCreated)
        {
            CloseZeroconfService();
        }

        CreateZeroconfService();
    }