socket v0.3.9 Socket.Datagram.Protocol protocol

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

t()
t() :: term

Functions

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

Receive a packet from the socket.

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.

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.

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

Send a packet to the given recipient.