From 7a7c90be0e87cb3b4920de5aaf215c4b9cebcb30 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 12 Dec 2019 16:01:06 +0100 Subject: kernel: Add -dist_listen false option This option makes it so that the distribution no longer listens for incoming connections. This way the node does not need to occupy a tcp port, but it also cannot be part of any global groups. --- lib/kernel/src/inet6_tcp_dist.erl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/kernel/src/inet6_tcp_dist.erl') diff --git a/lib/kernel/src/inet6_tcp_dist.erl b/lib/kernel/src/inet6_tcp_dist.erl index 9b6c2745d5..79f69bfa4c 100644 --- a/lib/kernel/src/inet6_tcp_dist.erl +++ b/lib/kernel/src/inet6_tcp_dist.erl @@ -22,7 +22,7 @@ %% Handles the connection setup phase with other Erlang nodes. -export([listen/1, accept/1, accept_connection/5, - setup/5, close/1, select/1, is_node_name/1]). + setup/5, close/1, select/1, address/0, is_node_name/1]). -export([setopts/2, getopts/2]). @@ -34,6 +34,14 @@ select(Node) -> inet_tcp_dist:gen_select(inet6_tcp, Node). +%% ------------------------------------------------------------ +%% Get address family +%% address() => #net_address{} +%% ------------------------------------------------------------ + +address() -> + inet_tcp_dist:gen_address(inet6_tcp). + %% ------------------------------------------------------------ %% Create the listen socket, i.e. the port that this erlang %% node is accessible through. -- cgit v1.2.1