From 14867ef618386d5008adf19b8d7a76e56f869145 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?=
Date: Thu, 12 Apr 2012 15:36:59 +0200
Subject: kernel: Initial doc of forgotten inet options
* UDP: ulticast_if, multicast_loop and multicast_ttl,
add_membership and drop_membership
* Inet: bit8, buffer, deliver, high_watermark, linger and
low_watermark
---
lib/kernel/doc/src/inet.xml | 86 +++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 84 insertions(+), 2 deletions(-)
(limited to 'lib/kernel/doc/src/inet.xml')
diff --git a/lib/kernel/doc/src/inet.xml b/lib/kernel/doc/src/inet.xml
index bf6c4cfb1a..05946f1f18 100644
--- a/lib/kernel/doc/src/inet.xml
+++ b/lib/kernel/doc/src/inet.xml
@@ -445,10 +445,27 @@ fe80::204:acff:fe17:bf38
flow control; the other side will not be able send
faster than the receiver can read.
+
+ {bit8, clear | set | on | off}
+ -
TODO: Document
+
+
{broadcast, Boolean}(UDP sockets)
-
Enable/disable permission to send broadcasts.
+
+ {buffer, Size}
+ -
+
Determines the size of the user-level software buffer used by
+ the driver. Not to be confused with sndbuf
+ and recbuf options which correspond to
+ the kernel socket buffers. It is recommended
+ to have val(buffer) >= max(val(sndbuf),val(recbuf)).
+ In fact, the val(buffer) is automatically set to
+ the above maximum when sndbuf or recbuf values are set.
+
+
{delay_send, Boolean}
-
Normally, when an Erlang process sends to a socket,
@@ -463,10 +480,19 @@ fe80::204:acff:fe17:bf38
real property of the socket. Needless to say it is an
implementation specific option. Default is false.
+
+ {deliver, port | term}
+ -
When {active, true} delivers data on the forms
+ port : {S, {data, [H1,..Hsz | Data]}} or
+ term : {tcp, S, [H1..Hsz | Data]}.
+
+
+
{dontroute, Boolean}
-
Enable/disable routing bypass for outgoing messages.
+
{exit_on_close, Boolean}
-
By default this option is set to true.
@@ -476,6 +502,7 @@ fe80::204:acff:fe17:bf38
gen_tcp:shutdown/2
to shutdown the write side.
+
{header, Size}
-
This option is only meaningful if the binary
@@ -487,6 +514,15 @@ fe80::204:acff:fe17:bf38
example Size == 2, the data received will match
[Byte1,Byte2|Binary].
+
+ {high_watermark, Size}
+ -
+ Sender is forced busy if sent and equeued data
+ readched the highwater mark.
+
Default: 8192 kB.
+
+
+
{keepalive, Boolean}(TCP/IP sockets)
-
Enables/disables periodic transmission on a connected
@@ -495,6 +531,41 @@ fe80::204:acff:fe17:bf38
considered broken and an error message will be sent to
the controlling process. Default disabled.
+
+ {linger, {true|false, Seconds}}
+ -
+
Determines the timeout in seconds for flushing unsent data in the
+ close/1 socket call. If the 1st component of the value
+ tuple is false, the 2nd one is ignored, which means that
+ close/1 returns immediately not waiting
+ for data to be flushed. Otherwise, the 2nd component is
+ the flushing time-out in seconds.
+
+
+ {low_watermark, Size}
+ -
+ If the port has reached its high_watermark it will
+ force busy onto senders. When the port data queue reaches the
+ low_watermark callers are no longer forced busy.
+
Default: 4096 kB.
+
+
+
+ {mode, Mode :: binary | list}
+ -
+
Received Packet is delivered as defined by Mode.
+
+
+ list
+ -
+
Received Packet is delivered as a list.
+
+
+ binary
+ -
+
Received Packet is delivered as a binary.
+
+
{nodelay, Boolean}(TCP/IP sockets)
-
If Boolean == true, the TCP_NODELAY option
@@ -578,6 +649,16 @@ fe80::204:acff:fe17:bf38
indicated length are accepted and not considered invalid due
to internal buffer limitations.
+
+ {priority, Priority}
+ -
Set the protocol-defined priority for all packets to be sent
+ on this socket.
+
+
+ {raw, Protocol, OptionNum, ValueBin}
+ -
See below.
+
+
{read_packets, Integer}(UDP sockets)
-
Sets the max number of UDP packets to read without
@@ -589,7 +670,7 @@ fe80::204:acff:fe17:bf38
high the system can become unresponsive due to
UDP packet flooding.
- {recbuf, Integer}
+ {recbuf, Size}
-
Gives the size of the receive buffer to use for
the socket.
@@ -620,7 +701,7 @@ fe80::204:acff:fe17:bf38
Default is false due to backward compatibility.
- {sndbuf, Integer}
+ {sndbuf, Size}
-
Gives the size of the send buffer to use for the socket.
@@ -639,6 +720,7 @@ fe80::204:acff:fe17:bf38
not implemented. Use with caution.
+
In addition to the options mentioned above, raw
option specifications can be used. The raw options are
specified as a tuple of arity four, beginning with the tag
--
cgit v1.2.3
From 5f8c0d0a439d1ff993c8485403b74aa2a9294248 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?=
Date: Fri, 13 Apr 2012 14:28:13 +0200
Subject: kernel: Document bit8 option in inet:setopts/2
* This is a highly specialized option which is
probably not used and will be removed in R16
---
lib/kernel/doc/src/inet.xml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
(limited to 'lib/kernel/doc/src/inet.xml')
diff --git a/lib/kernel/doc/src/inet.xml b/lib/kernel/doc/src/inet.xml
index 05946f1f18..522a27dcfa 100644
--- a/lib/kernel/doc/src/inet.xml
+++ b/lib/kernel/doc/src/inet.xml
@@ -447,7 +447,13 @@ fe80::204:acff:fe17:bf38
{bit8, clear | set | on | off}
- -
TODO: Document
+ -
+
+ Scans every byte in received data-packets and checks if the 8 bit
+ is set in any of them. Information is retrieved with
+ inet:getopts/2.
+ Deprecated! Will be removed in Erlang/OTP R16.
+
{broadcast, Boolean}(UDP sockets)
--
cgit v1.2.3