diff options
author | Lukas Larsson <[email protected]> | 2013-10-07 17:24:11 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2013-10-07 17:24:11 +0200 |
commit | 5ee95f1f10f879a9caec67248c27e74dacbf276d (patch) | |
tree | 42dc7c80174154357373c1ba9e614d15dc2c8bf7 /lib/kernel/doc/src/gen_udp.xml | |
parent | 036727ce61cfbd51ece3d20a07d33c10c035ecec (diff) | |
parent | 1e6c600111fac2cf564bcdfab0230ffd70cb30c3 (diff) | |
download | otp-5ee95f1f10f879a9caec67248c27e74dacbf276d.tar.gz otp-5ee95f1f10f879a9caec67248c27e74dacbf276d.tar.bz2 otp-5ee95f1f10f879a9caec67248c27e74dacbf276d.zip |
Merge branch 'sv-socket-active-n'
OTP-11368
* sv-socket-active-n:
Update preloaded
add {active,N} socket option for TCP, UDP, and SCTP
Diffstat (limited to 'lib/kernel/doc/src/gen_udp.xml')
-rw-r--r-- | lib/kernel/doc/src/gen_udp.xml | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/kernel/doc/src/gen_udp.xml b/lib/kernel/doc/src/gen_udp.xml index faca31e928..503725fe18 100644 --- a/lib/kernel/doc/src/gen_udp.xml +++ b/lib/kernel/doc/src/gen_udp.xml @@ -145,14 +145,23 @@ <seealso marker="inet#setopts/2">inet:setopts/2</seealso>.</p> </item> </taglist> - <p>The returned socket <c><anno>Socket</anno></c> is used to send packets - from this port with <c>send/4</c>. When UDP packets arrive at - the opened port, they are delivered as messages:</p> + <p>The returned socket <c><anno>Socket</anno></c> is used to send + packets from this port with <c>send/4</c>. When UDP packets arrive + at the opened port, if the socket is in an active mode the packets + are delivered as messages to the controlling process:</p> <code type="none"> {udp, Socket, IP, InPortNo, Packet}</code> - <p>Note that arriving UDP packets that are longer than + <p>If the socket is not in an active mode, data can be + retrieved via the <seealso marker="#recv/2">recv/2,3</seealso> calls. + Note that arriving UDP packets that are longer than the receive buffer option specifies, might be truncated without warning.</p> + <p>When a socket in <c>{active, N}</c> mode (see <seealso marker="inet#setopts/2"> + inet:setopts/2</seealso> for details) transitions to passive + (<c>{active, false}</c>) mode, the controlling process is notified by a + message of the following form:</p> + <code type="none"> +{udp_passive, Socket}</code> <p><c>IP</c> and <c>InPortNo</c> define the address from which <c>Packet</c> came. <c>Packet</c> is a list of bytes if the option <c>list</c> was specified. <c>Packet</c> is a |