diff options
author | Lukas Larsson <lukas@erlang.org> | 2019-12-12 16:01:06 +0100 |
---|---|---|
committer | Sverker Eriksson <sverker@erlang.org> | 2020-03-19 15:58:12 +0100 |
commit | 7a7c90be0e87cb3b4920de5aaf215c4b9cebcb30 (patch) | |
tree | 722a7463479ac39de41c26cb508abe0446bf6eaa /lib/kernel/src/inet6_tcp_dist.erl | |
parent | a8cac323f014c4b6f7160b6dbd71a19c81cd255b (diff) | |
download | erlang-7a7c90be0e87cb3b4920de5aaf215c4b9cebcb30.tar.gz |
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.
Diffstat (limited to 'lib/kernel/src/inet6_tcp_dist.erl')
-rw-r--r-- | lib/kernel/src/inet6_tcp_dist.erl | 10 |
1 files changed, 9 insertions, 1 deletions
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]). @@ -35,6 +35,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. %% ------------------------------------------------------------ |