Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Websocket components built with Box
es.
Synopsis
- data SocketConfig = SocketConfig {}
- defaultSocketConfig :: SocketConfig
- runClient :: SocketConfig -> ClientApp () -> IO ()
- runServer :: SocketConfig -> ServerApp -> IO ()
- connect :: PendingConnection -> Codensity IO Connection
- clientApp :: Box IO (Either Text Text) Text -> Connection -> IO ()
- responderApp :: (Text -> Either Text Text) -> PendingConnection -> IO ()
- serverApp :: Box IO Text Text -> PendingConnection -> IO ()
- receiver' :: Committer IO (Either Text Text) -> Connection -> IO Bool
- receiver :: Committer IO Text -> Connection -> IO ()
- sender :: (WebSocketsData a, Show a) => Box IO Text a -> Connection -> IO ()
- responder :: (Text -> Either Text Text) -> Committer IO Text -> Connection -> IO ()
Documentation
data SocketConfig Source #
Socket configuration
>>>
defaultSocketConfig
SocketConfig {host = "127.0.0.1", port = 9160, path = "/"}
Instances
defaultSocketConfig :: SocketConfig Source #
official default
connect :: PendingConnection -> Codensity IO Connection Source #
Connection continuation.
clientApp :: Box IO (Either Text Text) Text -> Connection -> IO () Source #
A simple client app for a box with Left debug messages.
responderApp :: (Text -> Either Text Text) -> PendingConnection -> IO () Source #
Canned response function.
receiver' :: Committer IO (Either Text Text) -> Connection -> IO Bool Source #
default websocket receiver with messages Lefts are info/debug
sender :: (WebSocketsData a, Show a) => Box IO Text a -> Connection -> IO () Source #
Sender that only emits.