Skip to content

Instantly share code, notes, and snippets.

@johnbender
Created August 21, 2010 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnbender/542012 to your computer and use it in GitHub Desktop.
Save johnbender/542012 to your computer and use it in GitHub Desktop.
import System.ZMQ as ZMQ
import Control.Monad
main = do context <- ZMQ.init 1
sock <- socket context Sub
subscribe sock ""
connect sock "tcp://localhost:5555"
forever $ do
str <- receive sock []
print str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment