Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newWebSocket :: (MonadDOM m, ToJSString url, ToJSString protocols) => url -> [protocols] -> m WebSocket
- newWebSocket' :: (MonadDOM m, ToJSString url, ToJSString protocol) => url -> protocol -> m WebSocket
- send :: (MonadDOM m, IsArrayBuffer data') => WebSocket -> data' -> m ()
- sendView :: (MonadDOM m, IsArrayBufferView data') => WebSocket -> data' -> m ()
- sendBlob :: (MonadDOM m, IsBlob data') => WebSocket -> data' -> m ()
- sendString :: (MonadDOM m, ToJSString data') => WebSocket -> data' -> m ()
- close :: (MonadDOM m, ToJSString reason) => WebSocket -> Maybe Word -> Maybe reason -> m ()
- pattern CONNECTING :: forall a. (Num a, Eq a) => a
- pattern OPEN :: forall a. (Num a, Eq a) => a
- pattern CLOSING :: forall a. (Num a, Eq a) => a
- pattern CLOSED :: forall a. (Num a, Eq a) => a
- getUrl :: (MonadDOM m, FromJSString result) => WebSocket -> m result
- getReadyState :: MonadDOM m => WebSocket -> m Word
- getBufferedAmount :: MonadDOM m => WebSocket -> m Word
- open :: EventName WebSocket Event
- message :: EventName WebSocket MessageEvent
- error :: EventName WebSocket UIEvent
- closeEvent :: EventName WebSocket CloseEvent
- getProtocol :: (MonadDOM m, FromJSString result) => WebSocket -> m (Maybe result)
- getProtocolUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => WebSocket -> m result
- getProtocolUnchecked :: (MonadDOM m, FromJSString result) => WebSocket -> m result
- getExtensions :: (MonadDOM m, FromJSString result) => WebSocket -> m (Maybe result)
- getExtensionsUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => WebSocket -> m result
- getExtensionsUnchecked :: (MonadDOM m, FromJSString result) => WebSocket -> m result
- setBinaryType :: (MonadDOM m, ToJSString val) => WebSocket -> val -> m ()
- getBinaryType :: (MonadDOM m, FromJSString result) => WebSocket -> m result
- newtype WebSocket = WebSocket {
- unWebSocket :: JSVal
- gTypeWebSocket :: JSM GType
Documentation
newWebSocket :: (MonadDOM m, ToJSString url, ToJSString protocols) => url -> [protocols] -> m WebSocket Source #
newWebSocket' :: (MonadDOM m, ToJSString url, ToJSString protocol) => url -> protocol -> m WebSocket Source #
sendString :: (MonadDOM m, ToJSString data') => WebSocket -> data' -> m () Source #
close :: (MonadDOM m, ToJSString reason) => WebSocket -> Maybe Word -> Maybe reason -> m () Source #
pattern CONNECTING :: forall a. (Num a, Eq a) => a Source #
getProtocol :: (MonadDOM m, FromJSString result) => WebSocket -> m (Maybe result) Source #
getProtocolUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => WebSocket -> m result Source #
getProtocolUnchecked :: (MonadDOM m, FromJSString result) => WebSocket -> m result Source #
getExtensions :: (MonadDOM m, FromJSString result) => WebSocket -> m (Maybe result) Source #
getExtensionsUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => WebSocket -> m result Source #
getExtensionsUnchecked :: (MonadDOM m, FromJSString result) => WebSocket -> m result Source #
setBinaryType :: (MonadDOM m, ToJSString val) => WebSocket -> val -> m () Source #
getBinaryType :: (MonadDOM m, FromJSString result) => WebSocket -> m result Source #
Functions for this inteface are in JSDOM.WebSocket. Base interface functions are in: