Stream -package

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
Stream :: IODeviceType
base GHC.IO.Device
A duplex communications channel (results in creation of a duplex GHC.IO.Handle.Handle). The standard libraries use this device type when creating GHC.IO.Handle.Handles for open sockets.
Stream :: SocketType
network Network.Socket
SOCK_STREAM
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 ;)
class Monad m => Stream s m t | s -> t
parsec Text.Parsec.Prim
An instance of Stream has stream type s, underlying monad m and token type t determined by the stream Some rough guidelines for a "correct" instance of Stream: * unfoldM uncons gives the [t] corresponding to the stream * A Stream instance is responsible for maintaining the "position within the stream" in the stream state s. This is trivial unless you are using the monad in a non-trivial way.
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
StreamChunk :: ByteString -> DecompressStream -> DecompressStream
zlib Codec.Compression.Zlib.Internal
StreamCopy :: BufferUsage
OpenGL Graphics.Rendering.OpenGL.GL.BufferObjects
data StreamDebugger x
HTTP Network.StreamDebugger
Allows stream logging. Refer to debugStream below.
StreamDraw :: BufferUsage
OpenGL Graphics.Rendering.OpenGL.GL.BufferObjects
StreamEnd :: DecompressStream
zlib Codec.Compression.Zlib.Internal
StreamError :: DecompressError -> String -> DecompressStream
zlib Codec.Compression.Zlib.Internal
An error code and a human readable error message.
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
data StreamPermParser s st a
parsec Text.Parsec.Perm
The type StreamPermParser s st a denotes a permutation parser that, when converted by the permute function, parses s streams with user state st and returns a value of type a on success. Normally, a permutation parser is first build with special operators like (<||>) and than transformed into a normal parser using permute.
StreamRead :: BufferUsage
OpenGL Graphics.Rendering.OpenGL.GL.BufferObjects
closeDirStream :: DirStream -> IO ()
unix System.Posix.Directory.ByteString, unix System.Posix.Directory
closeDirStream dp calls closedir to close the directory stream dp.
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.
data DecompressStream
zlib Codec.Compression.Zlib.Internal
A sequence of chunks of data produced from decompression. The difference from a simple list is that it contains a representation of errors as data rather than as exceptions. This allows you to handle error conditions explicitly.
data DirStream
unix System.Posix.Directory.ByteString, unix System.Posix.Directory
data DirStreamOffset
unix System.Posix.Directory.ByteString, unix System.Posix.Directory
foldDecompressStream :: (ByteString -> a -> a) -> a -> (DecompressError -> String -> a) -> DecompressStream -> a
zlib Codec.Compression.Zlib.Internal
Fold an DecompressionStream. Just like foldr but with an extra error case. For example to convert to a list and translate the errors into exceptions: > foldDecompressStream (:) [] (\code msg -> error msg)
fromDecompressStream :: DecompressStream -> ByteString
zlib Codec.Compression.Zlib.Internal
Convert a DecompressStream to a lazy ByteString. If any decompression errors are encountered then they are thrown as exceptions. This is a special case of foldDecompressStream.
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
maxVertexStreams :: GettableStateVar QueryIndex
OpenGL Graphics.Rendering.OpenGL.GL.QueryObjects
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.
openDirStream :: FilePath -> IO DirStream
unix System.Posix.Directory
openDirStream dir calls opendir to obtain a directory stream for dir.
openDirStream :: RawFilePath -> IO DirStream
unix System.Posix.Directory.ByteString
openDirStream dir calls opendir to obtain a directory stream for dir.
openSocketStream :: HStream bufType => String -> Int -> Socket -> IO (HandleStream bufType)
HTTP Network.TCP
openStream :: HStream bufType => String -> Int -> IO (HandleStream bufType)
HTTP Network.TCP
readDirStream :: DirStream -> IO FilePath
unix System.Posix.Directory
readDirStream dp calls readdir to obtain the next directory entry (struct dirent) for the open directory stream dp, and returns the d_name member of that structure.
readDirStream :: DirStream -> IO RawFilePath
unix System.Posix.Directory.ByteString
readDirStream dp calls readdir to obtain the next directory entry (struct dirent) for the open directory stream dp, and returns the d_name member of that structure.
rewindDirStream :: DirStream -> IO ()
unix System.Posix.Directory.ByteString, unix System.Posix.Directory
rewindDirStream dp calls rewinddir to reposition the directory stream dp at the beginning of the directory.
seekDirStream :: DirStream -> DirStreamOffset -> IO ()
unix System.Posix.Directory.ByteString, unix System.Posix.Directory

Show more results