transceiverF :: Socket -> F String String receiverF :: Socket -> F e String transmitterF :: Socket -> F String b
receiverFreads from a socket,
transmitterFwrites to a socket and
transceiverFis a combination of the former two.
The input and output are streams of strings rather than streams of characters
for efficiency reasons. The strings obtained from
arbitrary chunks of characters that have no relation to how the characters
were grouped by the sender.
An empty string in the output from
transceiverF indicates the end of the stream.
An empty string in the input to
causes the socket to be closed.
socket :: Socket
openSocketF "news" 119 transceiverF
Creating sockets: openSocketF, openFileAsSocketF.
Fudgets with asynchronous write: asyncTransceiverF et al.