Update since/changelog #772
This commit is contained in:
parent
704b904e1f
commit
beabde14bf
@ -1 +1,3 @@
|
|||||||
No changes logged yet
|
## 0.2.2
|
||||||
|
|
||||||
|
* Add exceptional websocket commands [#772](https://github.com/yesodweb/yesod/pull/772)
|
||||||
|
|||||||
@ -83,7 +83,7 @@ receiveData = ReaderT $ liftIO . WS.receiveData
|
|||||||
|
|
||||||
-- | Receive a piece of data from the client.
|
-- | Receive a piece of data from the client.
|
||||||
-- Capture SomeException as the result or operation
|
-- Capture SomeException as the result or operation
|
||||||
-- Since 0.1.1.3
|
-- Since 0.2.2
|
||||||
receiveDataE :: (MonadIO m, WS.WebSocketsData a) => WebSocketsT m (Either SomeException a)
|
receiveDataE :: (MonadIO m, WS.WebSocketsData a) => WebSocketsT m (Either SomeException a)
|
||||||
receiveDataE = ReaderT $ liftIO . tryAny . WS.receiveData
|
receiveDataE = ReaderT $ liftIO . tryAny . WS.receiveData
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ sendTextData = wrapWS WS.sendTextData
|
|||||||
-- Capture SomeException as the result or operation
|
-- Capture SomeException as the result or operation
|
||||||
-- and can be used like
|
-- and can be used like
|
||||||
-- `either handle_exception return =<< sendTextDataE ("Welcome" :: Text)`
|
-- `either handle_exception return =<< sendTextDataE ("Welcome" :: Text)`
|
||||||
-- Since 0.1.1.3
|
-- Since 0.2.2
|
||||||
sendTextDataE :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m (Either SomeException ())
|
sendTextDataE :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m (Either SomeException ())
|
||||||
sendTextDataE = wrapWSE WS.sendTextData
|
sendTextDataE = wrapWSE WS.sendTextData
|
||||||
|
|
||||||
@ -109,31 +109,31 @@ sendBinaryData = wrapWS WS.sendBinaryData
|
|||||||
|
|
||||||
-- | Send a binary message to the client.
|
-- | Send a binary message to the client.
|
||||||
-- Capture SomeException as the result of operation
|
-- Capture SomeException as the result of operation
|
||||||
-- Since 0.1.1.3
|
-- Since 0.2.2
|
||||||
sendBinaryDataE :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m (Either SomeException ())
|
sendBinaryDataE :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m (Either SomeException ())
|
||||||
sendBinaryDataE = wrapWSE WS.sendBinaryData
|
sendBinaryDataE = wrapWSE WS.sendBinaryData
|
||||||
|
|
||||||
-- | Send a ping message to the client.
|
-- | Send a ping message to the client.
|
||||||
--
|
--
|
||||||
-- Since 0.1.1.3
|
-- Since 0.2.2
|
||||||
sendPing :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m ()
|
sendPing :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m ()
|
||||||
sendPing = wrapWS WS.sendPing
|
sendPing = wrapWS WS.sendPing
|
||||||
|
|
||||||
-- | Send a ping message to the client.
|
-- | Send a ping message to the client.
|
||||||
-- Capture SomeException as the result of operation
|
-- Capture SomeException as the result of operation
|
||||||
-- Since 0.1.1.3
|
-- Since 0.2.2
|
||||||
sendPingE :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m (Either SomeException ())
|
sendPingE :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m (Either SomeException ())
|
||||||
sendPingE = wrapWSE WS.sendPing
|
sendPingE = wrapWSE WS.sendPing
|
||||||
|
|
||||||
-- | Send a close request to the client.
|
-- | Send a close request to the client.
|
||||||
--
|
--
|
||||||
-- Since 0.1.1.3
|
-- Since 0.2.2
|
||||||
sendClose :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m ()
|
sendClose :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m ()
|
||||||
sendClose = wrapWS WS.sendClose
|
sendClose = wrapWS WS.sendClose
|
||||||
|
|
||||||
-- | Send a close request to the client.
|
-- | Send a close request to the client.
|
||||||
-- Capture SomeException as the result of operation
|
-- Capture SomeException as the result of operation
|
||||||
-- Since 0.1.1.3
|
-- Since 0.2.2
|
||||||
sendCloseE :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m (Either SomeException ())
|
sendCloseE :: (MonadIO m, WS.WebSocketsData a) => a -> WebSocketsT m (Either SomeException ())
|
||||||
sendCloseE = wrapWSE WS.sendClose
|
sendCloseE = wrapWSE WS.sendClose
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user