Safe Haskell | None |
---|---|
Language | Haskell98 |
Network.WebSockets.Stream
Description
Lightweight abstraction over an input/output stream.
- data Stream
- makeStream :: IO (Maybe ByteString) -> (Maybe ByteString -> IO ()) -> IO Stream
- makeSocketStream :: Socket -> IO Stream
- makeEchoStream :: IO Stream
- parse :: Stream -> Parser a -> IO (Maybe a)
- write :: Stream -> ByteString -> IO ()
- close :: Stream -> IO ()
Documentation
Arguments
:: IO (Maybe ByteString) | Reading |
-> (Maybe ByteString -> IO ()) | Writing |
-> IO Stream | Resulting stream |
makeSocketStream :: Socket -> IO Stream Source
write :: Stream -> ByteString -> IO () Source