From 64c4668a65195283c7dbc24a677f8d3d46ac5513 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 2 May 2019 15:08:00 +0200 Subject: [esock|doc] Update with regard to the new select returns --- erts/doc/src/socket.xml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'erts/doc/src/socket.xml') diff --git a/erts/doc/src/socket.xml b/erts/doc/src/socket.xml index f9dd9575f4..48e91e93a7 100644 --- a/erts/doc/src/socket.xml +++ b/erts/doc/src/socket.xml @@ -47,24 +47,40 @@ recv/3 function with Timeout set to nowait (recv(Sock, 0, nowait)) when there is actually nothing to read, it will return with - {ok, SelectInfo}. When data eventually arrives a 'select' message - will be sent to the caller: + {ok, + SelectInfo}. + When data eventually arrives a 'select' message + will be sent to the caller:

+ + + + + {'$socket', Sock, select, Info} + +

The caller can now make another call to the recv function and now expect data.

Note that all other users are locked out until the 'current user' has called the function (recv in this case).

Another message the user must be prepared for (when making asynchronous - calls) is the abort message: + calls) is the abort message:

+ + + + + {'$socket', Sock, abort, Info} + +

This message indicates that the (asynchronous) operation has been aborted. If, for instance, the socket has been - closed (by another process), Reason will be {Ref, closed}.

+ closed (by another process), Info will be {Ref, closed}.

There is currently no support for Windows.

-- cgit v1.2.3