Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
TCP Boxes.
Synopsis
- data TCPConfig = TCPConfig {}
- defaultTCPConfig :: TCPConfig
- data Env = Env {}
- new :: TCPConfig -> IO Env
- close :: Env -> IO ()
- tcpEmitter :: Socket -> Emitter IO ByteString
- tcpCommitter :: Socket -> Committer IO ByteString
- tcpBox :: Socket -> Box IO ByteString ByteString
- tcpServer :: TCPConfig -> Box IO ByteString ByteString -> IO ()
- tcpResponder :: TCPConfig -> (ByteString -> IO ByteString) -> IO ()
- tcpSender :: TCPConfig -> Emitter IO ByteString -> IO ()
- tcpStdClient :: TCPConfig -> IO ()
- testHarness :: IO () -> IO ()
- testResponder :: IO ()
- testServerSender :: IO ()
Documentation
TCP configuration
>>>
defaultTCPConfig
TCPConfig {host = "127.0.0.1", port = "3566"}
Instances
Generic TCPConfig Source # | |
Show TCPConfig Source # | |
Eq TCPConfig Source # | |
type Rep TCPConfig Source # | |
Defined in Box.TCP type Rep TCPConfig = D1 ('MetaData "TCPConfig" "Box.TCP" "box-socket-0.4.1-LWqRyRmzNmq1mf13crzbPE" 'False) (C1 ('MetaCons "TCPConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "host") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "port") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) |
defaultTCPConfig :: TCPConfig Source #
default
An active TCP environment
tcpEmitter :: Socket -> Emitter IO ByteString Source #
Emits from a Socket
tcpCommitter :: Socket -> Committer IO ByteString Source #
Commits to a Socket
tcpBox :: Socket -> Box IO ByteString ByteString Source #
tcpServer :: TCPConfig -> Box IO ByteString ByteString -> IO () Source #
TCP server Box
tcpResponder :: TCPConfig -> (ByteString -> IO ByteString) -> IO () Source #
A server that explicitly responds to client messages.
tcpSender :: TCPConfig -> Emitter IO ByteString -> IO () Source #
A server independent of incoming messages.
tcpStdClient :: TCPConfig -> IO () Source #
A TCP client connected to stdin
testHarness :: IO () -> IO () Source #
test harness wrapping an action with a "q" escape.
testResponder :: IO () Source #
"echo: " <>
Responder
testServerSender :: IO () Source #
Test server.