aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernard Duggan <[email protected]>2016-02-04 13:10:02 +1100
committerBernard Duggan <[email protected]>2016-02-04 13:13:32 +1100
commit18ab537a26997c2c825f4b15db21c5160106d96e (patch)
tree478e23bcad7b1fdab3197b5494729cb8a4a3a3ac
parent7cb403e4aa044fd2cc7702dbe8e2d0eea68e81f3 (diff)
downloadotp-18ab537a26997c2c825f4b15db21c5160106d96e.tar.gz
otp-18ab537a26997c2c825f4b15db21c5160106d96e.tar.bz2
otp-18ab537a26997c2c825f4b15db21c5160106d96e.zip
Export gen_tcp:socket() type
When handling a gen_tcp socket, it's handy to be able to give it its proper type and have dialyzer be able to validate it, rather than falling back on using port(). The gen_udp equivalent is already exported.
-rw-r--r--lib/kernel/src/gen_tcp.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/kernel/src/gen_tcp.erl b/lib/kernel/src/gen_tcp.erl
index d7dba4ac80..8cb2a725e8 100644
--- a/lib/kernel/src/gen_tcp.erl
+++ b/lib/kernel/src/gen_tcp.erl
@@ -114,7 +114,8 @@
option().
-type socket() :: port().
--export_type([option/0, option_name/0, connect_option/0, listen_option/0]).
+-export_type([option/0, option_name/0, connect_option/0, listen_option/0,
+ socket/0]).
%%
%% Connect a socket