A channel which can send and receive values.
It is more general than what `network-mux` requires, see ByteChannel
instead. However this is useful for testing purposes when one is either
using mux or connecting two ends directly.
Constructors
Channelsend :: a -> m ()Write bytes to the channel.
It maybe raise exceptions.
recv :: m (Maybe a)Read some input from the channel, or
Nothingto indicate EOF.Note that having received EOF it is still possible to send. The EOF condition is however monotonic.
It may raise exceptions (as appropriate for the monad and kind of channel).