Commits

<h...@velum.net  committed 09bbc56

  • Participants
  • Parent commits fc1622d

Comments (0)

Files changed (1)

 client.disconnect()
 }}}
 
-Or here's a more elaborate example of using the {{{PublishSubscribeClient}}} in a multi-threaded context:
-
-{{{
-#!python
-import threading
-from stompclient import PublishSubscribeClient
-
-def frame_received(frame):
-  # Do something with the frame!
-  print "----Received Frame----\n%s\n-----" % frame
-
-client = PublishSubscribeClient('127.0.0.1', 61613)
-listener = threading.Thread(target=client.listen_forever)
-listener.start()
-
-# For our example, we want to wait until the server is actually listening
-client.listening_event.wait()
-
-client.subscribe("/queue/testing", frame_received)
-client.send("/queue/testing", "This is the body of the frame.")
-client.send("/queue/testing", '{"key": "Another frame example."}')
-client.disconnect()
-}}}
-
-Normally you probably wouldn't send messages to yourself using a message queue ... but hopefully you get the idea :)
+For more real-world examples (including subscribing/receiving frames), see the [[User Documentation]].