diff options
author | Anders Svensson <[email protected]> | 2013-06-04 15:16:29 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2013-06-10 11:40:51 +0200 |
commit | 0e42bec7ace7a42e6dc7de08e15b468746f463b3 (patch) | |
tree | 8d6d4dbd9eb841277cacd4bee344c28e067b97fb /lib/diameter/src/transport/diameter_sctp.erl | |
parent | a19f593704e5c9d1dd7a0f2b04341f9a929d7a41 (diff) | |
download | otp-0e42bec7ace7a42e6dc7de08e15b468746f463b3.tar.gz otp-0e42bec7ace7a42e6dc7de08e15b468746f463b3.tar.bz2 otp-0e42bec7ace7a42e6dc7de08e15b468746f463b3.zip |
Fix diameter_{tcp,sctp} spec
The third argument to start/3 was just wrong.
Diffstat (limited to 'lib/diameter/src/transport/diameter_sctp.erl')
-rw-r--r-- | lib/diameter/src/transport/diameter_sctp.erl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/diameter/src/transport/diameter_sctp.erl b/lib/diameter/src/transport/diameter_sctp.erl index 8b8c2a6694..de3333e605 100644 --- a/lib/diameter/src/transport/diameter_sctp.erl +++ b/lib/diameter/src/transport/diameter_sctp.erl @@ -42,6 +42,9 @@ -export([ports/0, ports/1]). +-export_type([listen_option/0, + connect_option/0]). + -include_lib("kernel/include/inet_sctp.hrl"). -include_lib("diameter/include/diameter.hrl"). @@ -62,6 +65,11 @@ %% association establishment. -define(ACCEPT_TIMEOUT, 5000). +-type connect_option() :: {raddr, inet:ip_address()} + | {rport, inet:port_number()} + | gen_sctp:open_option(). +-type listen_option() :: gen_sctp:open_option(). + -type uint() :: non_neg_integer(). %% Accepting/connecting transport process state. @@ -102,6 +110,13 @@ %% # start/3 %% --------------------------------------------------------------------------- +-spec start({accept, Ref}, #diameter_service{}, [listen_option()]) + -> {ok, pid(), [inet:ip_address()]} + when Ref :: diameter:transport_ref(); + ({connect, Ref}, #diameter_service{}, [connect_option()]) + -> {ok, pid(), [inet:ip_address()]} + when Ref :: diameter:transport_ref(). + start(T, #diameter_service{capabilities = Caps}, Opts) when is_list(Opts) -> diameter_sctp_sup:start(), %% start supervisors on demand |