Beispiel #1
0
        public void Send(OSCPacket packet)
        {
            if (useBundle && packet != null && (packet is OSCMessage))
            {
                _packetPool.Add(packet);

                return;
            }

            if (!transmitterBackend.IsAvaible)
            {
                return;
            }

            if (mapBundle != null)
            {
                mapBundle.Map(packet);
            }

            var data = OSCConverter.Pack(packet);

            transmitterBackend.Send(data);

            OSCConsole.Transmitted(this, packet);
        }
Beispiel #2
0
        public void Send(OSCPacket packet)
        {
            if (useBundle && packet != null && (packet is OSCMessage))
            {
                _packetPool.Add(packet);

                return;
            }

            if (!transmitterBackend.IsAvailable)
            {
                return;
            }

            if (mapBundle != null)
            {
                mapBundle.Map(packet);
            }

            var length = 0;
            var buffer = OSCConverter.Pack(packet, out length);

            transmitterBackend.Send(buffer, length);

            OSCConsole.Transmitted(this, packet);
        }