aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/socket.xml
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-05-06 12:19:41 +0200
committerMicael Karlberg <[email protected]>2019-05-29 18:49:29 +0200
commitd6dddf8ec963d34c91ec92b4772ff34238f2c718 (patch)
tree692c664a6b568c44e095f7c65cd5cec442251ee8 /erts/doc/src/socket.xml
parent88a1140f46b47e8a3526a7239f343ca344e9a3e1 (diff)
downloadotp-d6dddf8ec963d34c91ec92b4772ff34238f2c718.tar.gz
otp-d6dddf8ec963d34c91ec92b4772ff34238f2c718.tar.bz2
otp-d6dddf8ec963d34c91ec92b4772ff34238f2c718.zip
[esock] Connect can now also take a nowait Timeout
Had forgot about the connect function. But it can now also handle the Timeout = nowait, maybe resulting in a select. Required some nif work also... OTP-15731
Diffstat (limited to 'erts/doc/src/socket.xml')
-rw-r--r--erts/doc/src/socket.xml37
1 files changed, 29 insertions, 8 deletions
diff --git a/erts/doc/src/socket.xml b/erts/doc/src/socket.xml
index 47e84090ee..e5cf77663a 100644
--- a/erts/doc/src/socket.xml
+++ b/erts/doc/src/socket.xml
@@ -324,7 +324,7 @@
<p>In the case when there is no connections waiting, the function
will return with the <c>SelectInfo</c>. The caller can then await a
- select message, <c>{'$socket', Sock, select, Info}</c> (where
+ select message, <c>{'$socket', Socket, select, Info}</c> (where
<c>Info</c> is the <c>select_ref()</c> from the <c>SelectInfo</c>),
when a client connects (a subsequent call to accept will then return
the socket). </p>
@@ -377,7 +377,7 @@
<func>
<name name="connect" arity="2" since="OTP 22.0"/>
- <name name="connect" arity="3" since="OTP 22.0"/>
+ <name name="connect" arity="3" clause_i="2" since="OTP 22.0"/>
<fsummary>Initiate a connection on a socket.</fsummary>
<desc>
<p>This function connects the socket to the address
@@ -386,6 +386,24 @@
</func>
<func>
+ <name name="connect" arity="3" clause_i="1" anchor="connect_async" since="OTP @OTP-15731@"/>
+ <fsummary>Initiate a connection on a socket.</fsummary>
+ <desc>
+ <p>This function connects the socket to the address
+ specied by the <c>SockAddr</c> argument.</p>
+
+ <p>In the case when its not possible to immediately establish a
+ connection, the function will return with the
+ <seealso marker="#type-select_info"><c>SelectInfo</c></seealso>.
+ The caller can then await a
+ select message, <c>{'$socket', Socket, select, Info}</c> (where
+ <c>Info</c> is the <c>select_ref()</c> from the <c>SelectInfo</c>,
+ a subsequent call to connect will then
+ establish the connection). </p>
+ </desc>
+ </func>
+
+ <func>
<name name="getopt" arity="3" clause_i="1" since="OTP 22.0"/>
<name name="getopt" arity="3" clause_i="2" since="OTP 22.0"/>
<name name="getopt" arity="3" clause_i="3" since="OTP 22.0"/>
@@ -505,7 +523,7 @@
<p>In the case when there is no data waiting, the function
will return with the <c>SelectInfo</c>. The caller can then await a
- select message, <c>{'$socket', Sock, select, Info}</c> (where
+ select message, <c>{'$socket', Socket, select, Info}</c> (where
<c>Info</c> is the <c>select_ref()</c> from the <c>SelectInfo</c>),
when data has arrived (a subsequent call to recv will then return
the data). </p>
@@ -564,7 +582,7 @@
<p>In the case when there is no data waiting, the function
will return with the <c>SelectInfo</c>. The caller can then await a
- select message, <c>{'$socket', Sock, select, Info}</c> (where
+ select message, <c>{'$socket', Socket, select, Info}</c> (where
<c>Info</c> is the <c>select_ref()</c> from the <c>SelectInfo</c>),
when data has arrived (a subsequent call to recvfrom will then return
the data). </p>
@@ -640,7 +658,7 @@
<p>In the case when there is no data waiting, the function
will return with the <c>SelectInfo</c>. The caller can then await a
- select message, <c>{'$socket', Sock, select, Info}</c> (where
+ select message, <c>{'$socket', Socket, select, Info}</c> (where
<c>Info</c> is the <c>select_ref()</c> from the <c>SelectInfo</c>),
when data has arrived (a subsequent call to recvmsg will then return
the data). </p>
@@ -667,7 +685,8 @@
<p>In the case when there is no room in the (system-) buffers,
the function will return with the <c>SelectInfo</c>. The caller
- can then await a select message, <c>{'$socket', Sock, select, Info}</c>
+ can then await a select message,
+ <c>{'$socket', Socket, select, Info}</c>
(where <c>Info</c> is the <c>select_ref()</c> from the
<c>SelectInfo</c>), when there is room for more data (a subsequent
call to send will then send the data). </p>
@@ -724,7 +743,8 @@
<p>In the case when there is no room in the (system-) buffers,
the function will return with the <c>SelectInfo</c>. The caller
- can then await a select message, <c>{'$socket', Sock, select, Info}</c>
+ can then await a select message,
+ <c>{'$socket', Socket, select, Info}</c>
(where <c>Info</c> is the <c>select_ref()</c> from the
<c>SelectInfo</c>), when there is room for more data (a subsequent
call to sendmsg will then send the data). </p>
@@ -751,7 +771,8 @@
<p>In the case when there is no room in the (system-) buffers,
the function will return with the <c>SelectInfo</c>. The caller
- can then await a select message, <c>{'$socket', Sock, select, Info}</c>
+ can then await a select message,
+ <c>{'$socket', Socket, select, Info}</c>
(where <c>Info</c> is the <c>select_ref()</c> from the
<c>SelectInfo</c>), when there is room for more data (a subsequent
call to sendto will then send the data). </p>