Exemple #1
0
 // Listening thread
 protected void Listener()
 {
     while (!quitReceiver)
     {
         try
         {
             StompMessage stompMessage = stompConnection.WaitForMessage();
             if (stompMessage != null)
             {
                 OnReceivedMessage(new StompMessageEventArgs(stompMessage));
             }
         }
         catch (ThreadInterruptedException)
         {
             Console.Error.WriteLine("WARNING: ThreadInterruptedException in Listener...");
             if (quitReceiver)
             {
                 break;
             }
         }
         catch (SocketException)
         {
             Console.Error.WriteLine("WARNING: SocketException in Listener...");
             if (quitReceiver)
             {
                 break;
             }
         }
     }
     stompConnection.Abort();
 }
Exemple #2
0
 public StompMessageEventArgs(StompMessage message)
 {
     Message = message;
 }
Exemple #3
0
 public StompMessageEventArgs(StompMessage message)
 {
     Message = message;
 }