diff options
author | Raimo Niskanen <[email protected]> | 2019-06-12 11:31:06 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2019-06-12 11:31:06 +0200 |
commit | 51120ab353aba2f4d19a3e132525181aa079de7b (patch) | |
tree | 827d47ae006faae716edee14ca89dc9c1e1dd70d /lib/kernel | |
parent | e9a523fc5390aed551bd5570110f180a7f741322 (diff) | |
parent | cdc4d654777256790b277d24c709dd7e3831c451 (diff) | |
download | otp-51120ab353aba2f4d19a3e132525181aa079de7b.tar.gz otp-51120ab353aba2f4d19a3e132525181aa079de7b.tar.bz2 otp-51120ab353aba2f4d19a3e132525181aa079de7b.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/kernel')
-rw-r--r-- | lib/kernel/src/gen_sctp.erl | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/kernel/src/gen_sctp.erl b/lib/kernel/src/gen_sctp.erl index d893d44079..a63df54ff9 100644 --- a/lib/kernel/src/gen_sctp.erl +++ b/lib/kernel/src/gen_sctp.erl @@ -217,24 +217,29 @@ peeloff(S, AssocId) when is_port(S), is_integer(AssocId) -> Error -> Error end. --spec connect(Socket, Addr, Port, Opts) -> {ok, Assoc} | {error, inet:posix()} when +-spec connect(Socket, Addr, Port, Opts) -> + {ok, #sctp_assoc_change{state :: 'comm_up'}} | + {error, #sctp_assoc_change{state :: 'cant_assoc'}} | + {error, inet:posix()} + when Socket :: sctp_socket(), Addr :: inet:ip_address() | inet:hostname(), Port :: inet:port_number(), - Opts :: [Opt :: option()], - Assoc :: #sctp_assoc_change{}. + Opts :: [Opt :: option()]. connect(S, Addr, Port, Opts) -> connect(S, Addr, Port, Opts, infinity). -spec connect(Socket, Addr, Port, Opts, Timeout) -> - {ok, Assoc} | {error, inet:posix()} when + {ok, #sctp_assoc_change{state :: 'comm_up'}} | + {error, #sctp_assoc_change{state :: 'cant_assoc'}} | + {error, inet:posix()} + when Socket :: sctp_socket(), Addr :: inet:ip_address() | inet:hostname(), Port :: inet:port_number(), Opts :: [Opt :: option()], - Timeout :: timeout(), - Assoc :: #sctp_assoc_change{}. + Timeout :: timeout(). connect(S, Addr, Port, Opts, Timeout) -> case do_connect(S, Addr, Port, Opts, Timeout, true) of |