Stream

A Stream is an abstract flow of data from one point to another, like bytes flowing from a server to a client, or from a file to a program.

type alias Stream = Stream

A specific stream.

send : Stream -> Bytes -> Task x {}

This lets you send bytes over a Stream.

sendString : Stream -> String -> Task x {}

This lets you send a string over a Stream.

sendLine : Stream -> String -> Task x {}

This sends string and a newline over a Stream.

listen : Stream -> (Bytes -> msg) -> Sub msg

This notifies your application every time bytes have arrived over the Stream.