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; } }
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; }
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) {; } }
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) {; } }