Generalize a network connection to a sink and source
Documentation
class Network n i o whereSource
A network controls connections to other hosts. It may want to overide to log messages or play them back. A server in the network accepts messages of type i and generates messages of type o.
connect :: n -> Server -> IOE (Connection i o)Source
Connect to Server returning the send sink and receive source, throw IOError if can't connect.