Socket. Datagram. Protocol protocol
(socket2 v2.1.2)
Copy Markdown
Summary
Functions
Receive a packet from the socket.
Receive a packet with the given options or with the given size.
Receive a packet with the given size and options.
Send a packet to the given recipient.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
@spec recv(t()) :: {:ok, {iodata(), {Socket.Address.t(), :inet.port_number()}}} | {:error, term()}
Receive a packet from the socket.
@spec recv(t(), non_neg_integer() | Keyword.t()) :: {:ok, {iodata(), {Socket.Address.t(), :inet.port_number()}}} | {:error, term()}
Receive a packet with the given options or with the given size.
@spec recv(t(), non_neg_integer(), Keyword.t()) :: {:ok, {iodata(), {Socket.Address.t(), :inet.port_number()}}} | {:error, term()}
Receive a packet with the given size and options.
Send a packet to the given recipient.