From 2b268fb6ac18956a3d5d55eea57fdc461d5ef7bf Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Tue, 12 Feb 2019 15:18:07 +0100 Subject: [socket|doc] Fixed links and stuff Corrected linking references (links) to functions. Also added links from getopt/setopt functions to the users guide. Also added some comments to the socket module regarding open with (ready made) descriptor (which is not yet supported). OTP-14831 --- erts/doc/src/socket.xml | 26 ++++++++++++++++++++++---- erts/doc/src/socket_usage.xml | 1 + erts/preloaded/ebin/socket.beam | Bin 70280 -> 70280 bytes erts/preloaded/src/socket.erl | 4 +++- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/erts/doc/src/socket.xml b/erts/doc/src/socket.xml index 56737b1a8f..8a68ee3e90 100644 --- a/erts/doc/src/socket.xml +++ b/erts/doc/src/socket.xml @@ -4,7 +4,7 @@
- 20182018 + 20182019 Ericsson AB. All Rights Reserved. @@ -55,7 +55,7 @@ socket()

As returned by - open/2,3,4 and + open/2,3,4 and accept/1,2.

@@ -305,6 +305,10 @@ on what kind of socket it is (domain, type and protocol).

+ See the + socket options + chapter of the users guide for more info. +

Not all options are valid on all platforms. That is, even if "we" support an option, that does not mean that the underlying OS does.

@@ -324,6 +328,10 @@ using "native mode", it is *currently* up to the caller to know how to interpret the result.

+ See the + socket options + chapter of the users guide for more info. +

Not all options are valid on all platforms. That is, even if "we" support an option, that does not mean that the underlying OS does.

@@ -398,7 +406,8 @@ how much we want to read, it returns when we get a message.

The BufSz argument basically defines the size of the receive buffer. By setting the value to zero (0), the configured - size (setopt with Level = otp) is used.

+ size (setopt with Level = otp and Key = rcvbuf) + is used.

It may be impossible to know what (buffer) size is appropriate "in advance", and in those cases it may be convenient to use the (recv) 'peek' flag. When this flag is provided, the message is *not* @@ -427,7 +436,8 @@

The BufSz argument basically defines the size of the receive buffer. By setting the value to zero (0), the configured - size (setopt with Level = otp) is used.

+ size (setopt with Level = otp and Key = rcvbuf) + is used.

The CtrlSz argument basically defines the size of the receive buffer for the control messages. @@ -503,6 +513,10 @@ what kind of socket it is (domain, type and protocol).

+ See the + socket options + chapter of the users guide for more info. +

Not all options are valid on all platforms. That is, even if "we" support an option, that does not mean that the underlying OS does.

@@ -522,6 +536,10 @@ what kind of socket it is (domain, type and protocol).

+ See the + socket options + chapter of the users guide for more info. +

Not all options are valid on all platforms. That is, even if "we" support an option, that does not mean that the underlying OS does.

diff --git a/erts/doc/src/socket_usage.xml b/erts/doc/src/socket_usage.xml index 4ec31b5296..e0f006e618 100644 --- a/erts/doc/src/socket_usage.xml +++ b/erts/doc/src/socket_usage.xml @@ -42,6 +42,7 @@
+ Socket Options

Options for level otp:

diff --git a/erts/preloaded/ebin/socket.beam b/erts/preloaded/ebin/socket.beam index 360ac195f1..7f6fa76ece 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 f889c6e37b..f04f9701d3 100644 --- a/erts/preloaded/src/socket.erl +++ b/erts/preloaded/src/socket.erl @@ -949,10 +949,12 @@ supports(_Key1, _Key2, _Key3) -> %% %% %% -%% How do we handle the case when an fd has beem created (somehow) +%% How do we handle the case when an fd has been created (somehow) %% and we shall create a socket "from it". %% Can we figure out Domain, Type and Protocol from fd? %% Yes we can: SO_DOMAIN, SO_PROTOCOL, SO_TYPE +%% But does that work on all platforms? Or shall we require that the +%% caller provide this explicitly? %% %% %% -- cgit v1.2.3