aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorDimitris Zorbas <[email protected]>2017-11-26 20:48:03 +0000
committerDimitris Zorbas <[email protected]>2017-12-06 23:13:41 +0000
commitbc98fe2a55bfb54b39b0027213a7de60c14925c5 (patch)
tree1c57786e9729acca2b141bb49b310c8eefe2adf4 /lib/kernel
parentad484fc2003885e12b92ea49dcb1c71669761d62 (diff)
downloadotp-bc98fe2a55bfb54b39b0027213a7de60c14925c5.tar.gz
otp-bc98fe2a55bfb54b39b0027213a7de60c14925c5.tar.bz2
otp-bc98fe2a55bfb54b39b0027213a7de60c14925c5.zip
Add typespecs to inet:i
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/src/inet.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl
index dc20c21c77..fe91b0d33e 100644
--- a/lib/kernel/src/inet.erl
+++ b/lib/kernel/src/inet.erl
@@ -72,7 +72,7 @@
%% timer interface
-export([start_timer/1, timeout/1, timeout/2, stop_timer/1]).
--export_type([address_family/0, hostent/0, hostname/0, ip4_address/0,
+-export_type([address_family/0, socket_protocol/0, hostent/0, hostname/0, ip4_address/0,
ip6_address/0, ip_address/0, port_number/0,
local_address/0, socket_address/0, returned_non_ip_address/0,
socket_setopt/0, socket_getopt/0,
@@ -1452,11 +1452,14 @@ fdopen(Fd, Addr, Port, Opts, Protocol, Family, Type, Module) ->
%% socket stat
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-spec i() -> ok.
i() -> i(tcp), i(udp), i(sctp).
+-spec i(socket_protocol()) -> ok.
i(Proto) -> i(Proto, [port, module, recv, sent, owner,
local_address, foreign_address, state, type]).
+-spec i(socket_protocol(), [atom()]) -> ok.
i(tcp, Fs) ->
ii(tcp_sockets(), Fs, tcp);
i(udp, Fs) ->