From 80abf9d57e754bcb6b80d0501450a40bb281d3b6 Mon Sep 17 00:00:00 2001
From: Rickard Green
Date: Tue, 12 Mar 2019 22:52:31 +0100
Subject: Add possibility to also get size of data from
erlang:dist_ctrl_get_data()
---
erts/doc/src/erlang.xml | 85 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
(limited to 'erts/doc/src')
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index e78ded4ae1..0d94f83493 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -1269,6 +1269,42 @@ end
data is available by calling
erlang:dist_ctrl_get_data_notification(DHandle).
+ The returned value when there are data available depends
+ on the value of the get_size option configured on the
+ distribution channel identified by DHandle.
+ For more information see the documentation of the get_size
+ option for the
+ erlang:dist_ctrl_set_opt/3
+ function.
+
+ Only the process registered as distribution
+ controller for the distribution channel identified by
+ DHandle is allowed to call this
+ function.
+
+
+ This function is used when implementing an alternative
+ distribution carrier using processes as distribution
+ controllers. DHandle is retrived
+ via the callback
+ f_handshake_complete.
+ More information can be found in the documentation of
+ ERTS
+ User's Guide ➜ How to implement an Alternative Carrier
+ for the Erlang Distribution ➜ Distribution Module.
+
+
+
+
+
+
+ Get value of the get_size option on a distribution channel
+
+ Returns the value of the get_size option on the distribution channel
+ identified by DHandle. For more information see the
+ documentation of the get_size option for the
+ erlang:dist_ctrl_set_opt/3
+ function.
Only the process registered as distribution
controller for the distribution channel identified by
@@ -1391,6 +1427,55 @@ end
+
+
+ Set value of the get_size option on a distribution channel
+
+ Sets the value of the get_size option on the distribution channel
+ identified by DHandle. This option controls the return
+ value of calls to
+ erlang:dist_ctrl_get_data(DHandle)
+ where DHandle equals DHandle used
+ when setting this option.
+ When the get_size option is:
+
+ false
+ -
+ and there are distribution data available, a call to
+ erlang:dist_ctrl_get_data(DHandle)
+ will just return Data to pass over the channel.
+ This is the default value of the get_size option.
+
+ true
+ -
+ and there are distribution data available, a call to
+ erlang:dist_ctrl_get_data(DHandle)
+ will return Data to pass over the channel as well as
+ the Size of Data in bytes. This is returned as
+ a tuple on the form {Size, Data}.
+
+
+ All options are set to default when a channel is closed.
+
+ Only the process registered as distribution
+ controller for the distribution channel identified by
+ DHandle is allowed to call this
+ function.
+
+
+ This function is used when implementing an alternative
+ distribution carrier using processes as distribution
+ controllers. DHandle is retrived
+ via the callback
+ f_handshake_complete.
+ More information can be found in the documentation of
+ ERTS
+ User's Guide ➜ How to implement an Alternative Carrier
+ for the Erlang Distribution ➜ Distribution Module.
+
+
+
+
Return the Nth element of a tuple.
--
cgit v1.2.3