Skip to content

Instantly share code, notes, and snippets.

@tsloughter
Created April 22, 2014 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tsloughter/11161451 to your computer and use it in GitHub Desktop.
Save tsloughter/11161451 to your computer and use it in GitHub Desktop.
encryptedSubscribeSink c i =
awaitForever $ (\x ->
case decode (L.fromStrict x) of
Just (EncryptedSubscribeResponse (resp, _)) -> do
_ <- liftIO $ mapM (onMsg subOpts . decodeEncrypted c i) resp
return ()
Nothing ->
return ())
subscribeSink =
awaitForever $ (\x ->
case decode (L.fromStrict x) of
Just (SubscribeResponse (resp, _)) -> do
_ <- liftIO $ mapM (onMsg subOpts) resp
return ()
Nothing ->
return ())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment