aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-07-04 18:37:32 +0200
committerMicael Karlberg <[email protected]>2018-09-18 14:50:18 +0200
commiteacb95d88db1e1123d17288e71835b457bcf4016 (patch)
tree85815c2c5e25f6585732b83ae90c6424d184e949 /erts/doc
parente39e25d84405e13ca0ce476e3ba473510e5548de (diff)
downloadotp-eacb95d88db1e1123d17288e71835b457bcf4016.tar.gz
otp-eacb95d88db1e1123d17288e71835b457bcf4016.tar.bz2
otp-eacb95d88db1e1123d17288e71835b457bcf4016.zip
[socket-doc-nif] Updated documentation
Updated the documentation of recv, recvfrom, send and sendto. Also added doc for functions peername and sockname. OTP-14831
Diffstat (limited to 'erts/doc')
-rw-r--r--erts/doc/src/socket.xml37
1 files changed, 31 insertions, 6 deletions
diff --git a/erts/doc/src/socket.xml b/erts/doc/src/socket.xml
index 3efa412b8a..6f116abca9 100644
--- a/erts/doc/src/socket.xml
+++ b/erts/doc/src/socket.xml
@@ -63,13 +63,16 @@
<name name="ip_address"/>
</datatype>
<datatype>
- <name name="in4_sockaddr"/>
+ <name name="sockaddr"/>
</datatype>
<datatype>
- <name name="in6_sockaddr"/>
+ <name name="sockaddr_in4"/>
</datatype>
<datatype>
- <name name="in_sockaddr"/>
+ <name name="sockaddr_in6"/>
+ </datatype>
+ <datatype>
+ <name name="sockaddr_un"/>
</datatype>
<datatype>
<name name="port_number"/>
@@ -244,8 +247,18 @@
</func>
<func>
+ <name name="peername" arity="1"/>
+ <fsummary>Get name of connected socket peer.</fsummary>
+ <desc>
+ <p>Returns the address of the peer connected to the socket.</p>
+ </desc>
+ </func>
+
+ <func>
+ <name name="recv" arity="1"/>
<name name="recv" arity="2"/>
- <name name="recv" arity="3"/>
+ <name name="recv" arity="3" clause_i="1"/>
+ <name name="recv" arity="3" clause_i="2"/>
<name name="recv" arity="4"/>
<fsummary>Receive a message from a socket.</fsummary>
<desc>
@@ -259,7 +272,9 @@
<func>
<name name="recvfrom" arity="1"/>
<name name="recvfrom" arity="2"/>
- <name name="recvfrom" arity="3"/>
+ <name name="recvfrom" arity="3" clause_i="1"/>
+ <name name="recvfrom" arity="3" clause_i="2"/>
+ <name name="recvfrom" arity="3" clause_i="3"/>
<name name="recvfrom" arity="4"/>
<fsummary>Receive a message from a socket.</fsummary>
<desc>
@@ -279,7 +294,8 @@
<func>
<name name="send" arity="2"/>
- <name name="send" arity="3"/>
+ <name name="send" arity="3" clause_i="1"/>
+ <name name="send" arity="3" clause_i="2"/>
<name name="send" arity="4"/>
<fsummary>Send a message on a socket.</fsummary>
<desc>
@@ -288,6 +304,7 @@
</func>
<func>
+ <name name="sendto" arity="3"/>
<name name="sendto" arity="4"/>
<name name="sendto" arity="5"/>
<fsummary>Send a message on a socket.</fsummary>
@@ -329,6 +346,14 @@
</desc>
</func>
+ <func>
+ <name name="sockname" arity="1"/>
+ <fsummary>Get socket name.</fsummary>
+ <desc>
+ <p>Returns the current address to which the socket is bound.</p>
+ </desc>
+ </func>
+
</funcs>
<section>
<title>Examples</title>