GSMLG.Socket.Host (GSMLG.Socket v0.1.0)
Link to this section Summary
Functions
Get the hostent by address.
Get the hostent by address, raising if an error occurs.
Get the hostent by name.
Get the hostent by name and family.
Get the hostent by name, raising if an error occurs.
Get the hostent by name and family, raising if an error occurs.
Get the interfaces of the machine.
Get the interfaces of the machine, raising if an error occurs.
Get the hostname of the machine.
Link to this section Types
Link to this section Functions
by_address(address)
@spec by_address(GSMLG.Socket.Address.t()) :: {:ok, t()} | {:error, :inet.posix()}
Get the hostent by address.
by_address!(address)
@spec by_address!(GSMLG.Socket.Address.t()) :: t() | no_return()
Get the hostent by address, raising if an error occurs.
by_name(name)
@spec by_name(binary()) :: {:ok, t()} | {:error, :inet.posix()}
Get the hostent by name.
by_name(name, family)
@spec by_name(binary(), :inet.address_family()) :: {:ok, t()} | {:error, :inet.posix()}
Get the hostent by name and family.
by_name!(name)
Get the hostent by name, raising if an error occurs.
by_name!(name, family)
@spec by_name!(binary() | charlist(), :inet.address_family()) :: t() | no_return()
Get the hostent by name and family, raising if an error occurs.
interfaces()
@spec interfaces() :: {:ok, [tuple()]} | {:error, :inet.posix()}
Get the interfaces of the machine.
interfaces!()
Get the interfaces of the machine, raising if an error occurs.
name()
@spec name() :: String.t()
Get the hostname of the machine.