Ejemplo n.º 1
0
        void didRecievedEvent(OSCServer sender, OSCPacket packet)
        {
            lock (_queue)
            {
                if (packet.IsBundle())
                {
                    var bundle = packet as OSCBundle;

                    foreach (object obj in bundle.Data)
                    {
                        OSCMessage msg = obj as OSCMessage;
                        _queue.Enqueue(msg);
                    }
                }
                else
                {
                    _queue.Enqueue(packet as OSCMessage);
                }
            }
        }
Ejemplo n.º 2
0
        void didReceivedEvent(OSCServer sender, OSCPacket packet)
        {
            lock (_queue)
            {
                if (packet.IsBundle())
                {
                    var bundle = packet as OSCBundle;

                    foreach (object obj in bundle.Data)
                    {
                        OSCMessage msg = obj as OSCMessage;

                        if (OSCMaster.Instance.LogIncoming)
                        {
                            Debug.Log("[" + Name + "] " + msg.Address);
                            foreach (var data in msg.Data)
                            {
                                Debug.Log(data);
                            }
                        }

                        _queue.Enqueue(msg);
                    }
                }
                else
                {
                    OSCMessage msg = packet as OSCMessage;

                    if (OSCMaster.Instance.LogIncoming)
                    {
                        Debug.Log("[" + Name + "] " + msg.Address);
                        foreach (var data in msg.Data)
                        {
                            Debug.Log(data);
                        }
                    }

                    _queue.Enqueue(msg);
                }
            }
        }