Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (20 sloc) 0.561 kb
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad
import System.Exit
import System.IO
import System.Environment
import System.ZMQ4.Monadic
import qualified Data.ByteString.Char8 as CS
main :: IO ()
main = do
args <- getArgs
when (length args < 1) $ do
hPutStrLn stderr "usage: display <address> [<address>, ...]"
exitFailure
runZMQ $ do
sub <- socket Sub
subscribe sub ""
mapM_ (connect sub) args
forever $ do
receive sub >>= liftIO . CS.putStrLn
liftIO $ hFlush stdout
Jump to Line
Something went wrong with that request. Please try again.