diff options
author | Anders Svensson <[email protected]> | 2011-10-25 17:16:52 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2011-11-10 16:23:50 +0100 |
commit | a138f8420ed0386c6200899254190600bf121f97 (patch) | |
tree | ab00965aa90b627755cc61a4ef3813f40850db2a /lib/diameter/test/diameter_util.erl | |
parent | 30db65a00da4b0105faa760856286b42f0cde3e8 (diff) | |
download | otp-a138f8420ed0386c6200899254190600bf121f97.tar.gz otp-a138f8420ed0386c6200899254190600bf121f97.tar.bz2 otp-a138f8420ed0386c6200899254190600bf121f97.zip |
Use trivial capabilities callback in traffic suite
Diffstat (limited to 'lib/diameter/test/diameter_util.erl')
-rw-r--r-- | lib/diameter/test/diameter_util.erl | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/diameter/test/diameter_util.erl b/lib/diameter/test/diameter_util.erl index 3fe8ea5363..6b1dc1f0c9 100644 --- a/lib/diameter/test/diameter_util.erl +++ b/lib/diameter/test/diameter_util.erl @@ -33,8 +33,8 @@ %% diameter-specific -export([lport/2, lport/3, - listen/2, - connect/3, + listen/2, listen/3, + connect/3, connect/4, disconnect/4]). %% common_test-specific @@ -254,22 +254,28 @@ lp(M, Ref, T) -> end. %% --------------------------------------------------------------------------- -%% listen/2 +%% listen/2-3 %% %% Add a listening transport on the loopback address and a free port. listen(SvcName, Prot) -> - add_transport(SvcName, {listen, opts(Prot, listen)}). + listen(SvcName, Prot, []). + +listen(SvcName, Prot, Opts) -> + add_transport(SvcName, {listen, opts(Prot, listen) ++ Opts}). %% --------------------------------------------------------------------------- -%% connect/3 +%% connect/2-3 %% %% Add a connecting transport on and connect to a listening transport %% with the specified reference. connect(Client, Prot, LRef) -> + connect(Client, Prot, LRef, []). + +connect(Client, Prot, LRef, Opts) -> [PortNr] = lport(Prot, LRef, 20), - Ref = add_transport(Client, {connect, opts(Prot, PortNr)}), + Ref = add_transport(Client, {connect, opts(Prot, PortNr) ++ Opts}), true = diameter:subscribe(Client), ok = receive {diameter_event, Client, {up, Ref, _, _, _}} -> ok |