The net kernel is a system process, registered as
An Erlang node is started using command-line flag
$ erl -sname foobar
It is also possible to call
1> net_kernel:start([foobar, shortnames]). {ok,<0.64.0>} (foobar@gringotts)2>
If the node is started with command-line flag
Normally, connections are established automatically when
another node is referenced. This functionality can be disabled
by setting Kernel configuration parameter
Which nodes that are allowed to communicate with each other is handled
by the magic cookie system, see section
Permits access to the specified set of nodes.
Before the first call to
Subsequent calls to
Returns
Establishes a connection to
Gets
Defined return values (
The local node is not alive.
Get one or more options for the distribution socket
connected to
If
Returns
The calling process subscribes or unsubscribes to node
status change messages. A
If
As from Kernel version 2.11.4, and ERTS version 5.5.4, the following is guaranteed:
Notice that this is not guaranteed for Kernel versions before 2.11.4.
As from Kernel version 2.11.4, subscriptions can also be
made before the
As from Kernel version 2.13, and ERTS version 5.7, the following is guaranteed:
Notice that this is not guaranteed for Kernel versions before 2.13.
The format of the node status change messages depends on
{nodeup, Node} | {nodedown, Node}
Node = node()
If
{nodeup, Node, InfoList} | {nodedown, Node, InfoList}
Node = node()
InfoList = [{Tag, Val}]
Also, when
Valid values for
Subscribe to node status change messages for visible
nodes only. The tuple
Subscribe to node status change messages for hidden
nodes only. The tuple
Subscribe to node status change messages for both
visible and hidden nodes. The tuple
The tuple
The connection setup failed (after
No network is available.
The
Unspecified connection shutdown.
The connection was closed.
The connection was disconnected (forced from the current node).
Net tick time-out.
Failed to send net tick over the connection.
Status information retrieval from the
Sets
Some definitions:
The time of the least number of consecutive
If
The
Returns one of the following:
The request is ignored because
Set one or more options for distribution sockets.
Argument
The return value is the same as from
If
Returns
Turns a non-distributed node into a distributed node by
starting
Notice that the argument is a list with exactly one, two, or
three arguments.
Turns a distributed node into a non-distributed node. For
other nodes in the network, this is the same as the node
going down. Only possible when the net kernel was started using