From 65c0bd5c64bfa920e1d0a95f98458e6a751e72a3 Mon Sep 17 00:00:00 2001 From: tolysz Date: Mon, 14 Jul 2014 12:14:01 +0100 Subject: [PATCH] fix exports --- yesod-websockets/Yesod/WebSockets.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/yesod-websockets/Yesod/WebSockets.hs b/yesod-websockets/Yesod/WebSockets.hs index 75f795f3..57778faa 100644 --- a/yesod-websockets/Yesod/WebSockets.hs +++ b/yesod-websockets/Yesod/WebSockets.hs @@ -6,8 +6,15 @@ module Yesod.WebSockets WebSocketsT , webSockets , receiveData + , receiveDataX + , sendPing + , sendPingX + , sendClose + , sendCloseX , sendTextData + , sendTextDataX , sendBinaryData + , sendBinaryDataX -- * Conduit API , sourceWS , sinkWSText @@ -92,6 +99,13 @@ sendTextDataX ex x = ReaderT $ \c -> liftIO $ (flip WS.sendTextData x $ c) `E.ca sendBinaryData :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m () sendBinaryData x = ReaderT $ liftIO . flip WS.sendBinaryData x +-- | Send a binary message to the client. +-- Execute IO () action on WebSocket Exception +-- Since 0.1.1.3 +sendBinaryDataX :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m () +sendBinaryDataX ex x = ReaderT $ \c -> liftIO $ (flip WS.sendBinaryData x $ c) `E.catch` (\(_ :: E.SomeException) -> ex) + + -- | Send a ping message to the client. -- -- Since 0.1.1.3