aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/socket_usage.xml
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-04-30 15:06:15 +0200
committerMicael Karlberg <[email protected]>2019-05-29 18:40:57 +0200
commit043cb47a1967a63b316c7bd4cb4232f2e9b0f895 (patch)
tree4fb2830204ca02bde9fa54a8a47908ccd606db37 /erts/doc/src/socket_usage.xml
parent2d6f0763ddf80614d792cad96df38d0698eeb037 (diff)
downloadotp-043cb47a1967a63b316c7bd4cb4232f2e9b0f895.tar.gz
otp-043cb47a1967a63b316c7bd4cb4232f2e9b0f895.tar.bz2
otp-043cb47a1967a63b316c7bd4cb4232f2e9b0f895.zip
[esock|doc] Add text about the abort message
If another process closes the socket, the caller will receive an abort message instead (of the select message). OTP-15731
Diffstat (limited to 'erts/doc/src/socket_usage.xml')
-rw-r--r--erts/doc/src/socket_usage.xml13
1 files changed, 12 insertions, 1 deletions
diff --git a/erts/doc/src/socket_usage.xml b/erts/doc/src/socket_usage.xml
index 3d18bd1af7..fcfe9b54ec 100644
--- a/erts/doc/src/socket_usage.xml
+++ b/erts/doc/src/socket_usage.xml
@@ -56,8 +56,19 @@
when there is actually nothing to read, it will return with
<c>{ok, SelectInfo}</c>. When data eventually arrives a 'select message'
will be sent to the caller:
- <c>{'$socket', Sock, select, Info}</c>. The caller can make another
+ <list type="ordered">
+ <item><c>{'$socket', Sock, select, Info}</c></item>
+ </list>
+ The caller can then make another
call to the recv function and now expect data.</p>
+ <p>The user must also be prepared to receive an abort message:
+ <list type="ordered">
+ <item><c>{'$socket', Sock, abort, Reason}</c></item>
+ </list>
+ If the operation is aborted
+ for whatever reason (e.g. if the socket is closed "by someone else").
+ The <c>Reason</c> part contains the abort reason (in case the socket
+ has been closed <c>Reason = {Ref, closed}</c>). </p>
<p>Note that all other users are <em>locked out</em> until the
'current user' has called the function (recv in this case). So either
immediately call the function or