diff options
author | Raimo Niskanen <[email protected]> | 2011-09-02 10:29:58 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2011-11-17 12:11:02 +0100 |
commit | 1cc7485467b1b4e9efd15259b58e1182d2e9723c (patch) | |
tree | 50335d97ee93ca653e6dcdb1f6712d4cd05d79f4 /lib/kernel/src/inet_sctp.erl | |
parent | 3b81d47f7f4415661d4371989637374567e2ab2a (diff) | |
download | otp-1cc7485467b1b4e9efd15259b58e1182d2e9723c.tar.gz otp-1cc7485467b1b4e9efd15259b58e1182d2e9723c.tar.bz2 otp-1cc7485467b1b4e9efd15259b58e1182d2e9723c.zip |
erts,kernel: Implement gen_sctp:peeloff/2
Diffstat (limited to 'lib/kernel/src/inet_sctp.erl')
-rw-r--r-- | lib/kernel/src/inet_sctp.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/kernel/src/inet_sctp.erl b/lib/kernel/src/inet_sctp.erl index e670dcfdad..8482dd1b12 100644 --- a/lib/kernel/src/inet_sctp.erl +++ b/lib/kernel/src/inet_sctp.erl @@ -31,7 +31,8 @@ -define(FAMILY, inet). -export([getserv/1,getaddr/1,getaddr/2,translate_ip/1]). --export([open/1,close/1,listen/2,connect/5,sendmsg/3,send/4,recv/2]). +-export([open/1,close/1,listen/2,peeloff/2,connect/5]). +-export([sendmsg/3,send/4,recv/2]). @@ -64,6 +65,14 @@ close(S) -> listen(S, Flag) -> prim_inet:listen(S, Flag). +peeloff(S, AssocId) -> + case prim_inet:peeloff(S, AssocId) of + {ok, NewS}=Result -> + inet_db:register_socket(NewS, ?MODULE), + Result; + Error -> Error + end. + %% A non-blocking connect is implemented when the initial call is to %% gen_sctp:connect_init which passes the value nowait as the Timer connect(S, Addr, Port, Opts, Timer) -> |