aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/inet6_sctp.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2011-09-02 10:29:58 +0200
committerRaimo Niskanen <[email protected]>2011-11-17 12:11:02 +0100
commit1cc7485467b1b4e9efd15259b58e1182d2e9723c (patch)
tree50335d97ee93ca653e6dcdb1f6712d4cd05d79f4 /lib/kernel/src/inet6_sctp.erl
parent3b81d47f7f4415661d4371989637374567e2ab2a (diff)
downloadotp-1cc7485467b1b4e9efd15259b58e1182d2e9723c.tar.gz
otp-1cc7485467b1b4e9efd15259b58e1182d2e9723c.tar.bz2
otp-1cc7485467b1b4e9efd15259b58e1182d2e9723c.zip
erts,kernel: Implement gen_sctp:peeloff/2
Diffstat (limited to 'lib/kernel/src/inet6_sctp.erl')
-rw-r--r--lib/kernel/src/inet6_sctp.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/kernel/src/inet6_sctp.erl b/lib/kernel/src/inet6_sctp.erl
index f034535ba0..c47483bbdd 100644
--- a/lib/kernel/src/inet6_sctp.erl
+++ b/lib/kernel/src/inet6_sctp.erl
@@ -32,7 +32,8 @@
-define(FAMILY, inet6).
-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]).
@@ -65,6 +66,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.
+
connect(S, Addr, Port, Opts, Timer) ->
inet_sctp:connect(S, Addr, Port, Opts, Timer).