Exemple #1
0
 public void connect()
 {
     stompClient = new StompClientAll("ws://127.0.0.1:8080/gs-guide-websocket");
     stompClient.StompConnect().add(() => {
         Debug.Log("Connected!!!");
         stompClient.Subscribe("/topic/greetings", onMsg);
     });
 }
Exemple #2
0
        public void disconnecting_the_client_should_remove_all_traces()
        {
            Assert.That(_server.Queues, Is.Empty, "initial queue list should be empty");

            _client.Subscribe("reutel");
            Thread.Sleep(TimeSpan.FromSeconds(2));

            Assert.That(_server.Queues, Is.Not.Empty, "There should have been a queue called 'reutel'");

            _client.Disconnect();

            Thread.Sleep(TimeSpan.FromSeconds(2));

            Assert.That(_server.Queues, Is.Empty, "All queues should have been removed");
        }
Exemple #3
0
 /// <summary>
 /// Subscribes to the specified destination.
 /// </summary>
 /// <param name="destination">The destination.</param>
 public void Subscribe(string destination)
 {
     _stompClient.Subscribe(destination);
 }