Safe Haskell | None |
---|
- data Stream m a
- class Sendable a m
- send1 :: (Monad m, Sendable a m) => AppData m -> Source (Stream m) a -> m ()
- sendList :: (Monad m, Sendable a m) => AppData m -> Source (Stream m) a -> m ()
- class Streamable source m where
- receive :: source -> Sink ByteString (Stream m) b -> m (ResumableSource (Stream m) ByteString, b)
- receiveLast :: MonadResource m => ResumableSource (Stream m) ByteString -> Sink ByteString (Stream m) a -> m a
- close :: MonadResource m => ResumableSource (Stream m) ByteString -> m ()
- next :: MonadResource m => Conduit ByteString (Stream m) ByteString
- (~~) :: Monad m => Source (Stream m) a -> Sink a (Stream m) b -> m b
- sink1 :: (Monad m, Sendable a m) => AppData m -> Sink a (Stream m) ()
- sinkList :: (Monad m, Sendable a m) => AppData m -> Sink a (Stream m) ()
- sinkList' :: (Monad m, Sendable a m) => AppData m -> (Sink a (Stream m) () -> Sink b (Stream m) c) -> Sink b (Stream m) c
Network streams
ByteString
stream
MonadTrans Stream | |
Monad m => Monad (Stream m) | |
Functor m => Functor (Stream m) | |
Applicative m => Applicative (Stream m) | |
MonadThrow m => MonadThrow (Stream m) | |
(MonadResource m, MonadIO m) => MonadResource (Stream m) | |
MonadIO m => MonadIO (Stream m) | |
MonadResource m => Streamable (ResumableSource (Stream m) ByteString) m |
Sending
Monad m => Sendable ByteString m | |
Monad m => Sendable (Int, ByteString) m |
send1 :: (Monad m, Sendable a m) => AppData m -> Source (Stream m) a -> m ()Source
Send one single ByteString
over the network connection (if there is more
than one ByteString
in the pipe it will be discarded)
sendList :: (Monad m, Sendable a m) => AppData m -> Source (Stream m) a -> m ()Source
Send all ByteString
s in the pipe as a list over the network connection
Receiving
class Streamable source m whereSource
receive :: source -> Sink ByteString (Stream m) b -> m (ResumableSource (Stream m) ByteString, b)Source
Get the next package from a streamable source (calls next
automatically)
MonadResource m => Streamable (AppData m) m | |
MonadResource m => Streamable (ResumableSource (Stream m) ByteString) m |
receiveLast :: MonadResource m => ResumableSource (Stream m) ByteString -> Sink ByteString (Stream m) a -> m aSource
Get the next package from the stream and close the source afterwards
close :: MonadResource m => ResumableSource (Stream m) ByteString -> m ()Source
Close a resumable source
Manual sending/receiving
next :: MonadResource m => Conduit ByteString (Stream m) ByteStringSource
Get the next package from the stream (whether it's a single ByteString
or
a list)