Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            OscBundle bundle = CreateTestBundle();

            DemoType demoType = GetDemoType();

            ITransmitter transmitter;

            switch (demoType)
            {
            case DemoType.Udp:
                transmitter = new UdpTransmitter();
                break;

            case DemoType.Tcp:
                transmitter = new TcpTransmitter();
                break;

            case DemoType.Multicast:
                transmitter = new MulticastTransmitter();
                break;

            default:
                throw new Exception("Unsupported transmitter type.");
            }

            transmitter.Start(bundle);

            // Stop the transmitter, and exit, when a key is pressed.
            Console.ReadKey();
            transmitter.Stop();
        }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            OscBundle bundle = CreateTestBundle();

            DemoType demoType = GetDemoType();

            ITransmitter transmitter;
            switch (demoType)
            {
                case DemoType.Udp:
                    transmitter = new UdpTransmitter();
                    break;

                case DemoType.Tcp:
                    transmitter = new TcpTransmitter();
                    break;

                case DemoType.Multicast:
                    transmitter = new MulticastTransmitter();
                    break;

                default:
                    throw new Exception("Unsupported transmitter type.");
            }

            transmitter.Start(bundle);

            // Stop the transmitter, and exit, when a key is pressed.
            Console.ReadKey();
            transmitter.Stop();
        }