net
Module
net
Module Summary
Network interface.
Since
Module net was introduced in
OTP @OTP-14831@.
Description
This module provides an API for the network interface.
Data Types
address_info() =
#{family := socket:domain(),
socktype := socket:type(),
protocol := socket:protocol(),
address := socket:sockaddr()}
#{family := socket:domain(),
socktype := socket:type(),
protocol := socket:protocol(),
address := socket:sockaddr()}
Exports
Types
HostName = string()
Reason = term()
Returns the name of the current host.
OTP @OTP-14831@ |
OTP @OTP-14831@ |
Types
SockAddr = socket:sockaddr()
Flags = name_info_flags() | undefined
Info = name_info()
Reason = term()
Address-to-name translation in a protocol-independant manner.
This function is the inverse of getaddrinfo. It converts a socket address to a corresponding host and service.
OTP @OTP-14831@ |
OTP @OTP-14831@ |
OTP @OTP-14831@ |
OTP @OTP-14831@ |
Network address and service translation.
This function is the inverse of getnameinfo. It converts host and service to a corresponding socket address.
One of the Host and Service may be undefined but not both.
OTP @OTP-14831@ |
Mappings between network interface names and indexes.
OTP @OTP-14831@ |
Mappings between network interface index and names.
OTP @OTP-14831@ |
Types
Names = [{Idx, If}]
Reason = term()
Get network interface names and indexes.