aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/socket_test_ttest_tcp_gen.erl
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/test/socket_test_ttest_tcp_gen.erl')
-rw-r--r--erts/emulator/test/socket_test_ttest_tcp_gen.erl11
1 files changed, 9 insertions, 2 deletions
diff --git a/erts/emulator/test/socket_test_ttest_tcp_gen.erl b/erts/emulator/test/socket_test_ttest_tcp_gen.erl
index 604408c489..16e7ccf66b 100644
--- a/erts/emulator/test/socket_test_ttest_tcp_gen.erl
+++ b/erts/emulator/test/socket_test_ttest_tcp_gen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2018-2018. All Rights Reserved.
+%% Copyright Ericsson AB 2018-2019. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
accept/1, accept/2,
active/2,
close/1,
- connect/2,
+ connect/2, connect/3,
controlling_process/2,
listen/0, listen/1,
peername/1,
@@ -80,6 +80,13 @@ close(Sock) ->
connect(Addr, Port) ->
Opts = [binary, {packet, raw}, {active, false}, {buffer, 32*1024}],
+ do_connect(Addr, Port, Opts).
+
+connect(Addr, Port, #{domain := Domain}) ->
+ Opts = [Domain, binary, {packet, raw}, {active, false}, {buffer, 32*1024}],
+ do_connect(Addr, Port, Opts).
+
+do_connect(Addr, Port, Opts) ->
case gen_tcp:connect(Addr, Port, Opts) of
{ok, Sock} ->
{ok, Sock};