Ejemplo n.º 1
0
        public StompSource(PacketConverter <T> packetConverter, string serverPortTopic) : base(packetConverter)
        {
            string server = "localhost";
            int    port   = StompConnection.DEFAULT_PORT;
            string topic  = packetConverter.GetDefaultTopic(true);

            PacketSource <T> .ParseServerPortTopic(serverPortTopic, ref server, ref port, ref topic);

            // Create STOMP connection
            stompConnection = null;
            try
            {
                stompConnection = new StompConnection(server, port);
            }
            catch (Exception) {; }

            if (stompConnection != null)
            {
                // Subscribe to a topic
                stompConnection.Subscribe(topic);

                // Create threaded listener and add a message handler
                stompListener = new StompListener(stompConnection);
                stompListener.ReceivedMessage += stompListener_ReceivedMessage;
            }
        }
Ejemplo n.º 2
0
        public OscDest(PacketConverter <T> packetConverter, string serverPortTopic) : base(packetConverter)
        {
            string server = OscReceiver.DEFAULT_INTERFACE;
            int    port   = OscReceiver.DEFAULT_PORT;
            string topic  = packetConverter.GetDefaultTopic(false);

            PacketSource <T> .ParseServerPortTopic(serverPortTopic, ref server, ref port, ref topic);

            oscTransmitter = new OscTransmitter(server, port);
            this.topic     = topic;
        }
Ejemplo n.º 3
0
        public StompDest(PacketConverter <T> packetConverter, string serverPortTopic) : base(packetConverter)
        {
            string server = "localhost";
            int    port   = StompConnection.DEFAULT_PORT;
            string topic  = packetConverter.GetDefaultTopic(false);

            PacketSource <T> .ParseServerPortTopic(serverPortTopic, ref server, ref port, ref topic);

            this.topic = topic;

            // Create STOMP connection
            stompConnection = null;
            try
            {
                stompConnection = new StompConnection(server, port);
            }
            catch (Exception) {; }
        }
Ejemplo n.º 4
0
        public OscSource(PacketConverter <T> packetConverter, string serverPortTopic) : base(packetConverter)
        {
            string server = OscReceiver.DEFAULT_INTERFACE;
            int    port   = OscReceiver.DEFAULT_PORT;
            string topic  = packetConverter.GetDefaultTopic(false);

            PacketSource <T> .ParseServerPortTopic(serverPortTopic, ref server, ref port, ref topic);

            this.topic = topic;

            // Create OSC connection
            OscReceiver oscReceiver = null;

            try
            {
                oscReceiver = new OscReceiver(port);        // OscReceiver.DEFAULT_PORT
                oscReceiver.ReceivedBundle  += oscReceiver_ReceivedBundle;
                oscReceiver.ReceivedMessage += oscReceiver_ReceivedMessage;
                oscReceiver.Start();
            }
            catch (Exception) {; }
        }
Ejemplo n.º 5
0
 public void SetOutServerPortTopic(string serverPortTopic)
 {
     PacketSource <WaxPacket> .ParseServerPortTopic(serverPortTopic, ref outStompHost, ref outStompPort, ref outStompTopic);
 }