Back to Atomvm

Module erl_epmd

main-apidocs-erlang-estdlib-erl-underscore-epmd.md

latest2.1 KB
Original Source

Module erl_epmd

An implementation of the Erlang/OTP erl_epmd interface.

Behaviours: gen_server.

Description

This module implements a strict subset of the Erlang/OTP erl_epmd interface.

Function Index

| names/1 | Get the names and ports of all registered nodes This function will connect to epmd on localhost. | | port_please/2 | Get the port and version of a node on a given host. | | register_node/2 | Register to local epmd and get a creation number. | | start_link/0 | Start EPMD client. | | stop/0 | Stop EPMD client-. |

Function Details

names/1

names(Host::inet:hostname() | inet:ip_address()) -> {ok, [{string(), inet:port_number()}]} | {error, any()}

Host: the host to connect to

returns: a list of names and ports of registered nodes

Get the names and ports of all registered nodes This function will connect to epmd on localhost.

port_please/2

port_please(Name::iodata(), Host::inet:hostname() | inet:ip_address()) -> {port, inet:port_number(), non_neg_integer()} | noport

Name: name of the node to get the port of
Host: host of the node to get the port of

Get the port and version of a node on a given host. This function will connect to epmd on the host.

register_node/2

register_node(Name::iodata(), Port::inet:port_number()) -> {ok, non_neg_integer()} | {error, any()}

Name: name to register
Port: port to register

Register to local epmd and get a creation number

start_link() -> {ok, pid()}

Start EPMD client

stop/0

stop() -> ok

Stop EPMD client-