Socket. Stream
(sockets v2.1.7)
Copy Markdown
Unified interface for stream-based sockets (TCP, SSL, Port).
Delegates to Socket.Stream.Protocol and provides bang (!) variants of all
operations, plus io/2,3 for streaming data from an IO device directly into a
socket.
Summary
Functions
Read from the IO device and send to the socket following the given options.
Types
@type t() :: Socket.Stream.Protocol.t()
Functions
@spec io(t(), :io.device(), Keyword.t()) :: :ok | {:error, term()}
Read from the IO device and send to the socket following the given options.
Options
:sizeis the amount of bytes to read from the IO device, if omitted it will read until EOF:offsetis the amount of bytes to read from the IO device before starting to send what's being read:chunk_sizeis the size of the chunks read from the IO device at a time