socket v0.3.13 Socket.Datagram.Protocol protocol

Link to this section 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

Link to this section Types

Link to this section Functions

Link to this function recv(self)
recv(t()) ::
  {:ok, {iodata(), {Socket.Address.t(), :inet.port_number()}}}
  | {:error, term()}

Receive a packet from the socket.

Link to this function recv(self, length_or_options)
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.

Link to this function recv(self, length, options)
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.

Link to this function send(self, data, to)
send(t(), iodata(), term()) :: :ok | {:error, term()}

Send a packet to the given recipient.