GSMLG.Socket.Datagram.Protocol protocol (GSMLG.Socket v0.1.0)

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

@type t() :: term()

Link to this section Functions

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

Receive a packet from the socket.

Link to this function

recv(self, length_or_options)

@spec recv(t(), non_neg_integer() | Keyword.t()) ::
  {:ok, {iodata(), {GSMLG.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)

@spec recv(t(), non_neg_integer(), Keyword.t()) ::
  {:ok, {iodata(), {GSMLG.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)

@spec send(t(), iodata(), term()) :: :ok | {:error, term()}

Send a packet to the given recipient.