Stream +http

module Network.HTTP.Stream
HTTP Network.HTTP.Stream
Transmitting HTTP requests and responses holding String in their payload bodies. This is one of the implementation modules for the Network.HTTP interface, representing request and response content as Strings and transmitting them in non-packed form (cf. Network.HTTP.HandleStream and its use of ByteStrings.) over Stream handles. It is mostly here for backwards compatibility, representing how requests and responses were transmitted up until the 4.x releases of the HTTP package. For more detailed information about what the individual exports do, please consult the documentation for Network.HTTP. Notice however that the functions here do not perform any kind of normalization prior to transmission (or receipt); you are responsible for doing any such yourself, or, if you prefer, just switch to using Network.HTTP function instead.
module Network.Stream
HTTP Network.Stream
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
class Stream x
HTTP Network.Stream
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 ;)
module Network.StreamDebugger
HTTP Network.StreamDebugger
Implements debugging of Streams. Originally part of Gray's\/Bringert's HTTP module. * Changes by Robin Bate Boerop robin@bateboerop.name: - Created. Made minor formatting changes.
module Network.StreamSocket
HTTP Network.StreamSocket
Socket Stream instance. Originally part of Gray's\/Bringert's HTTP module. * Changes by Robin Bate Boerop robin@bateboerop.name: - Made dependencies explicit in import statements. - Removed false dependencies in import statements. - Created separate module for instance Stream Socket. * Changes by Simon Foster: - Split module up into to sepearate Network.[Stream,TCP,HTTP] modules
data StreamDebugger x
HTTP Network.StreamDebugger
Allows stream logging. Refer to debugStream below.
StreamHooks :: ((ty -> String) -> Result ty -> IO ()) -> ((ty -> String) -> Int -> Result ty -> IO ()) -> ((ty -> String) -> ty -> Result () -> IO ()) -> IO () -> String -> StreamHooks ty
HTTP Network.TCP
data StreamHooks ty
HTTP Network.TCP
debugByteStream :: HStream ty => FilePath -> HandleStream ty -> IO (HandleStream ty)
HTTP Network.StreamDebugger
debugStream :: Stream a => FilePath -> a -> IO (StreamDebugger a)
HTTP Network.StreamDebugger
Wraps a stream with logging I/O. The first argument is a filename which is opened in AppendMode.
getStreamHooks :: HandleStream ty -> IO (Maybe (StreamHooks ty))
HTTP Network.TCP
data HandleStream a
HTTP Network.TCP
class BufferType bufType => HStream bufType
HTTP Network.TCP
HStream overloads the use of HandleStreams, letting you overload the handle operations over the type that is communicated across the handle. It comes in handy for Network.HTTP Request and Responses as the payload representation isn't fixed, but overloaded. The library comes with instances for ByteStrings and String, but should you want to plug in your own payload representation, defining your own HStream instance _should_ be all that it takes.
hstreamToConnection :: HandleStream String -> Connection
HTTP Network.TCP
module Network.HTTP.HandleStream
HTTP Network.HTTP.HandleStream
A HandleStream-based version of Network.HTTP interface. For more detailed information about what the individual exports do, please consult the documentation for Network.HTTP. Notice however that the functions here do not perform any kind of normalization prior to transmission (or receipt); you are responsible for doing any such yourself, or, if you prefer, just switch to using Network.HTTP function instead.
openSocketStream :: HStream bufType => String -> Int -> Socket -> IO (HandleStream bufType)
HTTP Network.TCP
openStream :: HStream bufType => String -> Int -> IO (HandleStream bufType)
HTTP Network.TCP
setStreamHooks :: HandleStream ty -> StreamHooks ty -> IO ()
HTTP Network.TCP