aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2011-09-20 09:27:02 +0200
committerRaimo Niskanen <[email protected]>2011-11-16 11:07:12 +0100
commitbfb350ecc30d44e64ed75512690a0e4fbbb6bc2a (patch)
tree85db50778fce25dabab5800441077249f4839c59 /erts/preloaded
parentd0d13063fb27e185759c02e6b2e119f1c07035fd (diff)
downloadotp-bfb350ecc30d44e64ed75512690a0e4fbbb6bc2a.tar.gz
otp-bfb350ecc30d44e64ed75512690a0e4fbbb6bc2a.tar.bz2
otp-bfb350ecc30d44e64ed75512690a0e4fbbb6bc2a.zip
erts,kernel: Rename operations common to TCP and SCTP
Diffstat (limited to 'erts/preloaded')
-rw-r--r--erts/preloaded/src/prim_inet.erl13
1 files changed, 5 insertions, 8 deletions
diff --git a/erts/preloaded/src/prim_inet.erl b/erts/preloaded/src/prim_inet.erl
index 8f2e845b4f..adf64f90df 100644
--- a/erts/preloaded/src/prim_inet.erl
+++ b/erts/preloaded/src/prim_inet.erl
@@ -318,7 +318,7 @@ accept_opts(L, S) ->
end.
async_accept(L, Time) ->
- case ctl_cmd(L,?TCP_REQ_ACCEPT, [enc_time(Time)]) of
+ case ctl_cmd(L,?INET_REQ_ACCEPT, [enc_time(Time)]) of
{ok, [R1,R0]} -> {ok, ?u16(R1,R0)};
Error -> Error
end.
@@ -334,16 +334,13 @@ async_accept(L, Time) ->
%% listening) is also accepted:
listen(S) -> listen(S, ?LISTEN_BACKLOG).
-
+
+listen(S, true) -> listen(S, ?LISTEN_BACKLOG);
+listen(S, false) -> listen(S, 0);
listen(S, BackLog) when is_port(S), is_integer(BackLog) ->
- case ctl_cmd(S, ?TCP_REQ_LISTEN, [?int16(BackLog)]) of
+ case ctl_cmd(S, ?INET_REQ_LISTEN, [?int16(BackLog)]) of
{ok, _} -> ok;
Error -> Error
- end;
-listen(S, Flag) when is_port(S), is_boolean(Flag) ->
- case ctl_cmd(S, ?SCTP_REQ_LISTEN, enc_value(set, bool8, Flag)) of
- {ok,_} -> ok;
- Error -> Error
end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%