content/flux/v0/stdlib/socket/from.md
socket.from() returns data from a socket connection and outputs a stream of tables
given a specified decoder.
The function produces a single table for everything that it receives from the start to the end of the connection.
(url: string, ?decoder: string) => stream[A]
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
({{< req >}}) URL to return data from.
Supported URL schemes:
Decoder to use to parse returned data into a stream of tables.
Supported decoders:
import "socket"
socket.from(url: "tcp://127.0.0.1:1234", decoder: "csv")
import "socket"
socket.from(url: "tcp://127.0.0.1:1234", decoder: "line")