From 88a1140f46b47e8a3526a7239f343ca344e9a3e1 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Mon, 6 May 2019 10:44:07 +0200 Subject: [esock|doc] Make select_ref opaque OTP-15731 --- erts/doc/src/socket.xml | 20 ++++++-------------- erts/preloaded/ebin/socket.beam | Bin 74796 -> 74796 bytes erts/preloaded/src/socket.erl | 2 +- 3 files changed, 7 insertions(+), 15 deletions(-) (limited to 'erts') diff --git a/erts/doc/src/socket.xml b/erts/doc/src/socket.xml index 48e91e93a7..47e84090ee 100644 --- a/erts/doc/src/socket.xml +++ b/erts/doc/src/socket.xml @@ -51,15 +51,10 @@ SelectInfo}. When data eventually arrives a 'select' message will be sent to the caller:

- - {'$socket', Sock, select, Info} + {'$socket', socket(), select, select_ref()}

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

@@ -67,20 +62,15 @@ '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:

- - {'$socket', Sock, abort, Info} + {'$socket', socket(), abort, Info}

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

+ If, for instance, the socket has been closed (by another process), + Info will be {select_ref(), closed}.

There is currently no support for Windows.

@@ -111,6 +101,8 @@ +

A reference that uniquely identifies the (select) operation.

+
diff --git a/erts/preloaded/ebin/socket.beam b/erts/preloaded/ebin/socket.beam index fb4d9850e5..0f438e4ca9 100644 Binary files a/erts/preloaded/ebin/socket.beam and b/erts/preloaded/ebin/socket.beam differ diff --git a/erts/preloaded/src/socket.erl b/erts/preloaded/src/socket.erl index 60f162d37d..0b1b49653c 100644 --- a/erts/preloaded/src/socket.erl +++ b/erts/preloaded/src/socket.erl @@ -592,7 +592,7 @@ -type select_tag() :: atom(). --type select_ref() :: reference(). +-opaque select_ref() :: reference(). -record(select_info, {tag :: select_tag(), ref :: select_ref()}). -- cgit v1.2.3