Copyright | See LICENSE file |
---|---|
License | BSD |
Maintainer | Ganesh Sittampalam <ganesh@earth.li> |
Stability | experimental |
Portability | non-portable (not tested) |
Safe Haskell | Safe |
Language | Haskell98 |
An library for creating abstract streams. Originally part of Gray's\/Bringert's HTTP module.
- Changes by Robin Bate Boerop robin@bateboerop.name:
- Removed unnecessary import statements.
- Moved Debug code to StreamDebugger.hs
- Moved Socket-related code to StreamSocket.hs.
- Changes by Simon Foster:
- Split Network.HTTPmodule up into to separate Network.[Stream,TCP,HTTP] modules
Documentation
Streams should make layering of TLS protocol easier in future, they allow reading/writing to files etc for debugging, they allow use of protocols other than TCP/IP and they allow customisation.
Instances of this class should not trim the input in any way, e.g. leave LF on line endings etc. Unless that is exactly the behaviour you want from your twisted instances ;)
readLine :: x -> IO (Result String) Source #
readBlock :: x -> Int -> IO (Result String) Source #
Instances
Stream Socket Source # | |
Stream Connection Source # | |
Defined in Network.TCP readLine :: Connection -> IO (Result String) Source # readBlock :: Connection -> Int -> IO (Result String) Source # writeBlock :: Connection -> String -> IO (Result ()) Source # close :: Connection -> IO () Source # closeOnEnd :: Connection -> Bool -> IO () Source # | |
Stream x => Stream (StreamDebugger x) Source # | |
Defined in Network.StreamDebugger readLine :: StreamDebugger x -> IO (Result String) Source # readBlock :: StreamDebugger x -> Int -> IO (Result String) Source # writeBlock :: StreamDebugger x -> String -> IO (Result ()) Source # close :: StreamDebugger x -> IO () Source # closeOnEnd :: StreamDebugger x -> Bool -> IO () Source # |