aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/doc/src/ei_connect.xml
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-10-21 15:44:49 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-10-24 10:54:48 +0200
commit5f5fb466630db9dc8e17895c90ed74105852e827 (patch)
treeacd49e3700885cb9f1c77e8ae5c45479f0cc9c14 /lib/erl_interface/doc/src/ei_connect.xml
parent2aa61a092b11c63387574622f473ac16d8ace6e9 (diff)
downloadotp-5f5fb466630db9dc8e17895c90ed74105852e827.tar.gz
otp-5f5fb466630db9dc8e17895c90ed74105852e827.tar.bz2
otp-5f5fb466630db9dc8e17895c90ed74105852e827.zip
erl_interface: Remove CDATA tag except for example code
Diffstat (limited to 'lib/erl_interface/doc/src/ei_connect.xml')
-rw-r--r--lib/erl_interface/doc/src/ei_connect.xml334
1 files changed, 167 insertions, 167 deletions
diff --git a/lib/erl_interface/doc/src/ei_connect.xml b/lib/erl_interface/doc/src/ei_connect.xml
index be34fb7c53..607a7cbff4 100644
--- a/lib/erl_interface/doc/src/ei_connect.xml
+++ b/lib/erl_interface/doc/src/ei_connect.xml
@@ -44,32 +44,32 @@
<seealso marker="erts:erlang#nodes/0"><c>erlang:nodes/0</c></seealso>
in <c>ERTS</c>.</p>
- <p>The environment variable <c><![CDATA[ERL_EPMD_PORT]]></c> can be used
+ <p>The environment variable <c>ERL_EPMD_PORT</c> can be used
to indicate which logical cluster a C-node belongs to.</p>
</description>
<section>
<title>Time-Out Functions</title>
<p>Most functions appear in a version with the suffix
- <c><![CDATA[_tmo]]></c> appended to the function name. Those functions
+ <c>_tmo</c> appended to the function name. Those functions
take an extra argument, a time-out in <em>milliseconds</em>. The
semantics is this: for each communication primitive involved in
the operation, if the primitive does not complete within the time
specified, the function returns an error and
- <c><![CDATA[erl_errno]]></c> is set to <c><![CDATA[ETIMEDOUT]]></c>.
+ <c>erl_errno</c> is set to <c>ETIMEDOUT</c>.
With communication primitive is meant an operation on the socket, like
- <c><![CDATA[connect]]></c>, <c><![CDATA[accept]]></c>,
- <c><![CDATA[recv]]></c>, or <c><![CDATA[send]]></c>.</p>
+ <c>connect</c>, <c>accept</c>,
+ <c>recv</c>, or <c>send</c>.</p>
<p>Clearly the time-outs are for implementing fault tolerance,
- not to keep hard real-time promises. The <c><![CDATA[_tmo]]></c> functions
+ not to keep hard real-time promises. The <c>_tmo</c> functions
are for detecting non-responsive peers and to avoid blocking on
socket operations.</p>
- <p>A time-out value of <c><![CDATA[0]]></c> (zero) means that time-outs are
- disabled. Calling a <c><![CDATA[_tmo]]></c> function with the last
- argument as <c><![CDATA[0]]></c> is therefore the same thing as calling
- the function without the <c><![CDATA[_tmo]]></c> suffix.</p>
+ <p>A time-out value of <c>0</c> (zero) means that time-outs are
+ disabled. Calling a <c>_tmo</c> function with the last
+ argument as <c>0</c> is therefore the same thing as calling
+ the function without the <c>_tmo</c> suffix.</p>
<p>As with all other functions starting with <c>ei_</c>,
you are <em>not</em> expected
@@ -80,9 +80,9 @@
avoid problems, leave the socket options alone. <c>ei</c> handles
any socket options that need modification.</p>
- <p>In all other senses, the <c><![CDATA[_tmo]]></c> functions inherit all
+ <p>In all other senses, the <c>_tmo</c> functions inherit all
the return values and the semantics from the functions without
- the <c><![CDATA[_tmo]]></c> suffix.</p>
+ the <c>_tmo</c> suffix.</p>
</section>
<funcs>
@@ -105,15 +105,15 @@
connection from a client process.</p>
<list type="bulleted">
<item>
- <p><c><![CDATA[ec]]></c> is the C-node structure.</p>
+ <p><c>ec</c> is the C-node structure.</p>
</item>
<item>
- <p><c><![CDATA[listensock]]></c> is an open socket descriptor on
- which <c><![CDATA[listen()]]></c> has previously been called.</p>
+ <p><c>listensock</c> is an open socket descriptor on
+ which <c>listen()</c> has previously been called.</p>
</item>
<item>
- <p><c><![CDATA[conp]]></c> is a pointer to an
- <c><![CDATA[ErlConnect]]></c> struct, described as follows:</p>
+ <p><c>conp</c> is a pointer to an
+ <c>ErlConnect</c> struct, described as follows:</p>
<code type="none"><![CDATA[
typedef struct {
char ipadr[4];
@@ -122,10 +122,10 @@ typedef struct {
]]></code>
</item>
</list>
- <p>On success, <c><![CDATA[conp]]></c> is filled in with the address and
+ <p>On success, <c>conp</c> is filled in with the address and
node name of the connecting client and a file descriptor is
- returned. On failure, <c><![CDATA[ERL_ERROR]]></c> is returned and
- <c><![CDATA[erl_errno]]></c> is set to <c><![CDATA[EIO]]></c>.</p>
+ returned. On failure, <c>ERL_ERROR</c> is returned and
+ <c>erl_errno</c> is set to <c>EIO</c>.</p>
</desc>
</func>
@@ -146,34 +146,34 @@ typedef struct {
<fsummary>Establish a connection to an Erlang node.</fsummary>
<desc>
<p>Sets up a connection to an Erlang node.</p>
- <p><c><![CDATA[ei_xconnect()]]></c> requires the IP address of the
+ <p><c>ei_xconnect()</c> requires the IP address of the
remote host and the alive name of the remote node to be
- specified. <c><![CDATA[ei_connect()]]></c> provides an alternative
+ specified. <c>ei_connect()</c> provides an alternative
interface and determines the information from the node name
provided.</p>
<list type="bulleted">
- <item><c><![CDATA[addr]]></c> is the 32-bit IP address of the remote
+ <item><c>addr</c> is the 32-bit IP address of the remote
host.</item>
- <item><c><![CDATA[alive]]></c> is the alivename of the remote node.
+ <item><c>alive</c> is the alivename of the remote node.
</item>
- <item><c><![CDATA[node]]></c> is the name of the remote node.</item>
+ <item><c>node</c> is the name of the remote node.</item>
</list>
<p>These functions return an open file descriptor on success, or
a negative value indicating that an error occurred. In the latter
- case they set <c><![CDATA[erl_errno]]></c> to one of the
+ case they set <c>erl_errno</c> to one of the
following:</p>
<taglist>
- <tag><c><![CDATA[EHOSTUNREACH]]></c></tag>
- <item>The remote host <c><![CDATA[node]]></c> is unreachable.</item>
- <tag><c><![CDATA[ENOMEM]]></c></tag>
+ <tag><c>EHOSTUNREACH</c></tag>
+ <item>The remote host <c>node</c> is unreachable.</item>
+ <tag><c>ENOMEM</c></tag>
<item>No more memory is available.</item>
- <tag><c><![CDATA[EIO]]></c></tag>
+ <tag><c>EIO</c></tag>
<item>I/O error.</item>
</taglist>
- <p>Also, <c><![CDATA[errno]]></c> values from
- <c><![CDATA[socket]]></c><em>(2)</em> and
- <c><![CDATA[connect]]></c><em>(2)</em>
- system calls may be propagated into <c><![CDATA[erl_errno]]></c>.</p>
+ <p>Also, <c>errno</c> values from
+ <c>socket</c><em>(2)</em> and
+ <c>connect</c><em>(2)</em>
+ system calls may be propagated into <c>erl_errno</c>.</p>
<p><em>Example:</em></p>
<code type="none"><![CDATA[
#define NODE "[email protected]"
@@ -196,49 +196,49 @@ fd = ei_xconnect(&ec, &addr, ALIVE);
<name><ret>int</ret><nametext>ei_connect_xinit(ei_cnode* ec, const char *thishostname, const char *thisalivename, const char *thisnodename, Erl_IpAddr thisipaddr, const char *cookie, short creation)</nametext></name>
<fsummary>Initialize for a connection.</fsummary>
<desc>
- <p>Initializes the <c><![CDATA[ec]]></c> structure, to
+ <p>Initializes the <c>ec</c> structure, to
identify the node name and cookie of the server. One of them
must be called before other functions that works on the
- <c><![CDATA[ei_cnode]]></c> type or a file descriptor associated with
+ <c>ei_cnode</c> type or a file descriptor associated with
a connection to another node is used.</p>
<list type="bulleted">
<item>
- <p><c><![CDATA[ec]]></c> is a structure containing information about
- the C-node. It is used in other <c><![CDATA[ei]]></c> functions
+ <p><c>ec</c> is a structure containing information about
+ the C-node. It is used in other <c>ei</c> functions
for connecting and receiving data.</p>
</item>
<item>
- <p><c><![CDATA[this_node_name]]></c> is the registered name of the
+ <p><c>this_node_name</c> is the registered name of the
process (the name before '@').</p>
</item>
<item>
- <p><c><![CDATA[cookie]]></c> is the cookie for the node.</p>
+ <p><c>cookie</c> is the cookie for the node.</p>
</item>
<item>
- <p><c><![CDATA[creation]]></c> identifies a specific instance of a
+ <p><c>creation</c> identifies a specific instance of a
C-node. It can help prevent the node from receiving messages
sent to an earlier process with the same registered name.</p>
</item>
<item>
- <p><c><![CDATA[thishostname]]></c> is the name of the machine we are
+ <p><c>thishostname</c> is the name of the machine we are
running on. If long names are to be used, they are to be fully
- qualified (that is, <c><![CDATA[durin.erix.ericsson.se]]></c>
- instead of <c><![CDATA[durin]]></c>).</p>
+ qualified (that is, <c>durin.erix.ericsson.se</c>
+ instead of <c>durin</c>).</p>
</item>
<item>
- <p><c><![CDATA[thisalivename]]></c> is the registered name of the
+ <p><c>thisalivename</c> is the registered name of the
process.</p>
</item>
<item>
- <p><c><![CDATA[thisnodename]]></c> is the full name of the node,
- that is, <c><![CDATA[einode@durin]]></c>.</p>
+ <p><c>thisnodename</c> is the full name of the node,
+ that is, <c>einode@durin</c>.</p>
</item>
<item>
- <p><c><![CDATA[thispaddr]]></c> if the IP address of the host.</p>
+ <p><c>thispaddr</c> if the IP address of the host.</p>
</item>
</list>
<p>A C-node acting as a server is assigned a creation
- number when it calls <c><![CDATA[ei_publish()]]></c>.</p>
+ number when it calls <c>ei_publish()</c>.</p>
<p>A connection is closed by simply closing the socket.
For information about how to close the socket gracefully (when
there are outgoing packets before close), see the relevant system
@@ -306,32 +306,32 @@ if (ei_connect_init(&ec, "madonna", "cookie...", n++) < 0) {
with the local name server EPMD, thereby allowing
other processes to send messages by using the registered name.
Before calling either of these functions, the process should
- have called <c><![CDATA[bind()]]></c> and <c><![CDATA[listen()]]></c>
+ have called <c>bind()</c> and <c>listen()</c>
on an open socket.</p>
<list type="bulleted">
<item>
- <p><c><![CDATA[ec]]></c> is the C-node structure.</p>
+ <p><c>ec</c> is the C-node structure.</p>
</item>
<item>
- <p><c><![CDATA[port]]></c> is the local name to register, and is to
+ <p><c>port</c> is the local name to register, and is to
be the same as the port number that was previously bound to the
socket.</p>
</item>
<item>
- <p><c><![CDATA[addr]]></c> is the 32-bit IP address of the local
+ <p><c>addr</c> is the 32-bit IP address of the local
host.</p>
</item>
</list>
<p>To unregister with EPMD, simply close the returned descriptor. Do
- not use <c><![CDATA[ei_unpublish()]]></c>, which is deprecated
+ not use <c>ei_unpublish()</c>, which is deprecated
anyway.</p>
<p>On success, the function returns a descriptor connecting the
calling process to EPMD. On failure, <c>-1</c> is returned and
- <c><![CDATA[erl_errno]]></c> is set to <c><![CDATA[EIO]]></c>.</p>
- <p>Also, <c><![CDATA[errno]]></c> values from
- <c><![CDATA[socket]]></c><em>(2)</em> and
- <c><![CDATA[connect]]></c><em>(2)</em> system calls may be propagated
- into <c><![CDATA[erl_errno]]></c>.</p>
+ <c>erl_errno</c> is set to <c>EIO</c>.</p>
+ <p>Also, <c>errno</c> values from
+ <c>socket</c><em>(2)</em> and
+ <c>connect</c><em>(2)</em> system calls may be propagated
+ into <c>erl_errno</c>.</p>
</desc>
</func>
@@ -353,34 +353,34 @@ if (ei_connect_init(&ec, "madonna", "cookie...", n++) < 0) {
of bytes in the Erlang external format.</p>
<list type="bulleted">
<item>
- <p><c><![CDATA[fd]]></c> is an open descriptor to an Erlang
+ <p><c>fd</c> is an open descriptor to an Erlang
connection. It is obtained from a previous
- <c><![CDATA[ei_connect]]></c> or <c><![CDATA[ei_accept]]></c>.</p>
+ <c>ei_connect</c> or <c>ei_accept</c>.</p>
</item>
<item>
- <p><c><![CDATA[bufp]]></c> is a buffer large enough to hold the
+ <p><c>bufp</c> is a buffer large enough to hold the
expected message.</p>
</item>
<item>
- <p><c><![CDATA[bufsize]]></c> indicates the size of
- <c><![CDATA[bufp]]></c>.</p>
+ <p><c>bufsize</c> indicates the size of
+ <c>bufp</c>.</p>
</item>
</list>
<p>If a <em>tick</em> occurs, that is, the Erlang node on the
other end of the connection has polled this node to see if it
- is still alive, the function returns <c><![CDATA[ERL_TICK]]></c> and
+ is still alive, the function returns <c>ERL_TICK</c> and
no message is placed in the buffer. Also,
- <c><![CDATA[erl_errno]]></c> is set to <c><![CDATA[EAGAIN]]></c>.</p>
+ <c>erl_errno</c> is set to <c>EAGAIN</c>.</p>
<p>On success, the message is placed in the specified buffer
and the function returns the number of bytes actually read. On
- failure, the function returns <c><![CDATA[ERL_ERROR]]></c> and sets
- <c><![CDATA[erl_errno]]></c> to one of the following:</p>
+ failure, the function returns <c>ERL_ERROR</c> and sets
+ <c>erl_errno</c> to one of the following:</p>
<taglist>
- <tag><c><![CDATA[EAGAIN]]></c></tag>
+ <tag><c>EAGAIN</c></tag>
<item>Temporary error: Try again.</item>
- <tag><c><![CDATA[EMSGSIZE]]></c></tag>
+ <tag><c>EMSGSIZE</c></tag>
<item>Buffer is too small.</item>
- <tag><c><![CDATA[EIO]]></c></tag>
+ <tag><c>EIO</c></tag>
<item>I/O error.</item>
</taglist>
</desc>
@@ -394,20 +394,20 @@ if (ei_connect_init(&ec, "madonna", "cookie...", n++) < 0) {
generated by the interface compiler and with code following
examples in the same application.</p>
<p>In essence, the function performs the same operation as
- <c><![CDATA[ei_xreceive_msg]]></c>, but instead of using an
+ <c>ei_xreceive_msg</c>, but instead of using an
<c>ei_x_buff</c>, the function expects a pointer to a character
- pointer (<c><![CDATA[mbufp]]></c>), where the character pointer
- is to point to a memory area allocated by <c><![CDATA[malloc]]></c>.
- Argument <c><![CDATA[bufsz]]></c> is to be a pointer to an integer
+ pointer (<c>mbufp</c>), where the character pointer
+ is to point to a memory area allocated by <c>malloc</c>.
+ Argument <c>bufsz</c> is to be a pointer to an integer
containing the exact size (in bytes) of the memory area. The function
may reallocate the memory area and will in such cases put the new
- size in <c><![CDATA[*bufsz]]></c> and update
- <c><![CDATA[*mbufp]]></c>.</p>
+ size in <c>*bufsz</c> and update
+ <c>*mbufp</c>.</p>
<p>Returns either <c>ERL_TICK</c> or the
- <c><![CDATA[msgtype]]></c> field of the
- <c><![CDATA[erlang_msg *msg]]></c>. The length
- of the message is put in <c><![CDATA[*msglen]]></c>. On error
- a value <c><![CDATA[< 0]]></c> is returned.</p>
+ <c>msgtype</c> field of the
+ <c>erlang_msg *msg</c>. The length
+ of the message is put in <c>*msglen</c>. On error
+ a value <c>&lt; 0</c> is returned.</p>
<p>It is recommended to use <c>ei_xreceive_msg</c> instead when
possible, for the sake of readability. However, the function will
be retained in the interface for compatibility and
@@ -432,23 +432,23 @@ if (ei_connect_init(&ec, "madonna", "cookie...", n++) < 0) {
<name><ret>int</ret><nametext>ei_xreceive_msg(int fd, erlang_msg* msg, ei_x_buff* x)</nametext></name>
<fsummary>Receive a message.</fsummary>
<desc>
- <p>Receives a message to the buffer in <c><![CDATA[x]]></c>.
- <c><![CDATA[ei_xreceive_msg]]></c> allows the buffer in
- <c><![CDATA[x]]></c> to grow, but <c><![CDATA[ei_receive_msg]]></c>
+ <p>Receives a message to the buffer in <c>x</c>.
+ <c>ei_xreceive_msg</c> allows the buffer in
+ <c>x</c> to grow, but <c>ei_receive_msg</c>
fails if the message is larger than the pre-allocated buffer in
- <c><![CDATA[x]]></c>.</p>
+ <c>x</c>.</p>
<list type="bulleted">
- <item><c><![CDATA[fd]]></c> is an open descriptor to an Erlang
+ <item><c>fd</c> is an open descriptor to an Erlang
connection.</item>
- <item><c><![CDATA[msg]]></c> is a pointer to an
- <c><![CDATA[erlang_msg]]></c> structure
+ <item><c>msg</c> is a pointer to an
+ <c>erlang_msg</c> structure
and contains information on the message received.</item>
- <item><c><![CDATA[x]]></c> is buffer obtained from
- <c><![CDATA[ei_x_new]]></c>.</item>
+ <item><c>x</c> is buffer obtained from
+ <c>ei_x_new</c>.</item>
</list>
- <p>On success, the functions return <c><![CDATA[ERL_MSG]]></c> and the
- <c><![CDATA[msg]]></c> struct is initialized.
- <c><![CDATA[erlang_msg]]></c> is defined as follows:</p>
+ <p>On success, the functions return <c>ERL_MSG</c> and the
+ <c>msg</c> struct is initialized.
+ <c>erlang_msg</c> is defined as follows:</p>
<code type="none"><![CDATA[
typedef struct {
long msgtype;
@@ -459,31 +459,31 @@ typedef struct {
erlang_trace token;
} erlang_msg;
]]></code>
- <p><c><![CDATA[msgtype]]></c> identifies the type of message, and is
+ <p><c>msgtype</c> identifies the type of message, and is
one of the following:</p>
<taglist>
- <tag><c><![CDATA[ERL_SEND]]></c></tag>
+ <tag><c>ERL_SEND</c></tag>
<item>
<p>Indicates that an ordinary send operation has occurred.
- <c><![CDATA[msg->to]]></c> contains the pid of the recipient (the
+ <c>msg-&gt;to</c> contains the pid of the recipient (the
C-node).</p>
</item>
- <tag><c><![CDATA[ERL_REG_SEND]]></c></tag>
+ <tag><c>ERL_REG_SEND</c></tag>
<item>
<p>A registered send operation occurred.
- <c><![CDATA[msg->from]]></c> contains the pid of the sender.</p>
+ <c>msg-&gt;from</c> contains the pid of the sender.</p>
</item>
- <tag><c><![CDATA[ERL_LINK]]></c> or
- <c><![CDATA[ERL_UNLINK]]></c></tag>
+ <tag><c>ERL_LINK</c> or
+ <c>ERL_UNLINK</c></tag>
<item>
- <p><c><![CDATA[msg->to]]></c> and
- <c><![CDATA[msg->from]]></c> contain the pids of the
+ <p><c>msg-&gt;to</c> and
+ <c>msg-&gt;from</c> contain the pids of the
sender and recipient of the link or unlink.</p>
</item>
- <tag><c><![CDATA[ERL_EXIT]]></c></tag>
+ <tag><c>ERL_EXIT</c></tag>
<item>
- <p>Indicates a broken link. <c><![CDATA[msg->to]]></c> and
- <c><![CDATA[msg->from]]></c> contain the pids of the linked
+ <p>Indicates a broken link. <c>msg-&gt;to</c> and
+ <c>msg-&gt;from</c> contain the pids of the linked
processes.</p>
</item>
</taglist>
@@ -520,19 +520,19 @@ typedef struct {
<p>Sends an Erlang term to a registered process.</p>
<list type="bulleted">
<item>
- <p><c><![CDATA[fd]]></c> is an open descriptor to an Erlang
+ <p><c>fd</c> is an open descriptor to an Erlang
connection.</p>
</item>
- <item><c><![CDATA[server_name]]></c> is the registered name of the
+ <item><c>server_name</c> is the registered name of the
intended recipient.</item>
- <item><c><![CDATA[buf]]></c> is the buffer containing the term in
+ <item><c>buf</c> is the buffer containing the term in
binary format.</item>
- <item><c><![CDATA[len]]></c> is the length of the message in bytes.
+ <item><c>len</c> is the length of the message in bytes.
</item>
</list>
<p>Returns <c>0</c> if successful, otherwise <c>-1</c>. In
- the latter case it sets <c><![CDATA[erl_errno]]></c> to
- <c><![CDATA[EIO]]></c>.</p>
+ the latter case it sets <c>erl_errno</c> to
+ <c>EIO</c>.</p>
<p><em>Example:</em></p>
<p>Send the atom "ok" to the process "worker":</p>
<code type="none"><![CDATA[
@@ -563,75 +563,75 @@ if (ei_reg_send(&ec, fd, x.buff, x.index) < 0)
<fsummary>Remote Procedure Call from C to Erlang.</fsummary>
<desc>
<p>Supports calling Erlang functions on remote nodes.
- <c><![CDATA[ei_rpc_to()]]></c> sends an RPC request to a remote node
- and <c><![CDATA[ei_rpc_from()]]></c> receives the results of such a
- call. <c><![CDATA[ei_rpc()]]></c> combines the functionality of these
+ <c>ei_rpc_to()</c> sends an RPC request to a remote node
+ and <c>ei_rpc_from()</c> receives the results of such a
+ call. <c>ei_rpc()</c> combines the functionality of these
two functions by sending an RPC request and waiting for the results.
See also <seealso marker="kernel:rpc#call/4">
<c>rpc:call/4</c></seealso> in Kernel.</p>
<list type="bulleted">
<item>
- <p><c><![CDATA[ec]]></c> is the C-node structure previously
- initiated by a call to <c><![CDATA[ei_connect_init()]]></c> or
- <c><![CDATA[ei_connect_xinit()]]></c>.</p>
+ <p><c>ec</c> is the C-node structure previously
+ initiated by a call to <c>ei_connect_init()</c> or
+ <c>ei_connect_xinit()</c>.</p>
</item>
<item>
- <p><c><![CDATA[fd]]></c> is an open descriptor to an Erlang
+ <p><c>fd</c> is an open descriptor to an Erlang
connection.</p>
</item>
<item>
- <p><c><![CDATA[timeout]]></c> is the maximum time (in milliseconds)
- to wait for results. Specify <c><![CDATA[ERL_NO_TIMEOUT]]></c> to
+ <p><c>timeout</c> is the maximum time (in milliseconds)
+ to wait for results. Specify <c>ERL_NO_TIMEOUT</c> to
wait forever.
- <c><![CDATA[ei_rpc()]]></c> waits infinitely for the answer,
+ <c>ei_rpc()</c> waits infinitely for the answer,
that is, the call will never time out.</p>
</item>
<item>
- <p><c><![CDATA[mod]]></c> is the name of the module containing the
+ <p><c>mod</c> is the name of the module containing the
function to be run on the remote node.</p>
</item>
<item>
- <p><c><![CDATA[fun]]></c> is the name of the function to run.</p>
+ <p><c>fun</c> is the name of the function to run.</p>
</item>
<item>
- <p><c><![CDATA[argbuf]]></c> is a pointer to a buffer with an
+ <p><c>argbuf</c> is a pointer to a buffer with an
encoded Erlang list, without a version magic number, containing
the arguments to be passed to the function.</p>
</item>
<item>
- <p><c><![CDATA[argbuflen]]></c> is the length of the buffer
+ <p><c>argbuflen</c> is the length of the buffer
containing the encoded Erlang list.</p>
</item>
<item>
- <p><c><![CDATA[msg]]></c> is structure of type
- <c><![CDATA[erlang_msg]]></c> and contains information on the
+ <p><c>msg</c> is structure of type
+ <c>erlang_msg</c> and contains information on the
message
- received. For a description of the <c><![CDATA[erlang_msg]]></c>
+ received. For a description of the <c>erlang_msg</c>
format, see <seealso marker="#ei_receive_msg">
<c>ei_receive_msg</c></seealso>.</p>
</item>
<item>
- <p><c><![CDATA[x]]></c> points to the dynamic buffer that receives
- the result. For <c><![CDATA[ei_rpc()]]></c> this is the result
+ <p><c>x</c> points to the dynamic buffer that receives
+ the result. For <c>ei_rpc()</c> this is the result
without the version magic number. For
- <c><![CDATA[ei_rpc_from()]]></c> the result returns a version
- magic number and a 2-tuple <c><![CDATA[{rex,Reply}]]></c>.</p>
+ <c>ei_rpc_from()</c> the result returns a version
+ magic number and a 2-tuple <c>{rex,Reply}</c>.</p>
</item>
</list>
- <p><c><![CDATA[ei_rpc()]]></c> returns the number of bytes in the
+ <p><c>ei_rpc()</c> returns the number of bytes in the
result on success and <c>-1</c> on failure.
- <c><![CDATA[ei_rpc_from()]]></c> returns the
- number of bytes, otherwise one of <c><![CDATA[ERL_TICK]]></c>,
- <c><![CDATA[ERL_TIMEOUT]]></c>,
- and <c><![CDATA[ERL_ERROR]]></c>. When failing, all three
- functions set <c><![CDATA[erl_errno]]></c> to one of the
+ <c>ei_rpc_from()</c> returns the
+ number of bytes, otherwise one of <c>ERL_TICK</c>,
+ <c>ERL_TIMEOUT</c>,
+ and <c>ERL_ERROR</c>. When failing, all three
+ functions set <c>erl_errno</c> to one of the
following:</p>
<taglist>
- <tag><c><![CDATA[EIO]]></c></tag>
+ <tag><c>EIO</c></tag>
<item>I/O error.</item>
- <tag><c><![CDATA[ETIMEDOUT]]></c></tag>
+ <tag><c>ETIMEDOUT</c></tag>
<item>Time-out expired.</item>
- <tag><c><![CDATA[EAGAIN]]></c></tag>
+ <tag><c>EAGAIN</c></tag>
<item>Temporary error: Try again.</item>
</taglist>
<p><em>Example:</em></p>
@@ -662,11 +662,11 @@ if (ei_decode_version(result.buff, &index) < 0
<fsummary>Retrieve the pid of the C-node.</fsummary>
<desc>
<p>Retrieves the pid of the C-node. Every C-node
- has a (pseudo) pid used in <c><![CDATA[ei_send_reg]]></c>,
- <c><![CDATA[ei_rpc]]></c>,
- and others. This is contained in a field in the <c><![CDATA[ec]]></c>
+ has a (pseudo) pid used in <c>ei_send_reg</c>,
+ <c>ei_rpc</c>,
+ and others. This is contained in a field in the <c>ec</c>
structure. It will be safe for a long time to fetch this
- field directly from the <c><![CDATA[ei_cnode]]></c> structure.</p>
+ field directly from the <c>ei_cnode</c> structure.</p>
</desc>
</func>
@@ -676,18 +676,18 @@ if (ei_decode_version(result.buff, &index) < 0
<desc>
<p>Sends an Erlang term to a process.</p>
<list type="bulleted">
- <item><c><![CDATA[fd]]></c> is an open descriptor to an Erlang
+ <item><c>fd</c> is an open descriptor to an Erlang
connection.</item>
- <item><c><![CDATA[to]]></c> is the pid of the intended recipient of
+ <item><c>to</c> is the pid of the intended recipient of
the message.</item>
- <item><c><![CDATA[buf]]></c> is the buffer containing the term in
+ <item><c>buf</c> is the buffer containing the term in
binary format.</item>
- <item><c><![CDATA[len]]></c> is the length of the message in bytes.
+ <item><c>len</c> is the length of the message in bytes.
</item>
</list>
<p>Returns <c>0</c> if successful, otherwise <c>-1</c>. In
- the latter case it sets <c><![CDATA[erl_errno]]></c> to
- <c><![CDATA[EIO]]></c>.</p>
+ the latter case it sets <c>erl_errno</c> to
+ <c>EIO</c>.</p>
</desc>
</func>
@@ -720,14 +720,14 @@ if (ei_decode_version(result.buff, &index) < 0
<p>This function is retained for compatibility with code
generated by the interface compiler and with code following
examples in the same application.</p>
- <p>The function works as <c><![CDATA[ei_reg_send]]></c> with one
- exception. Instead of taking <c><![CDATA[ei_cnode]]></c> as first
+ <p>The function works as <c>ei_reg_send</c> with one
+ exception. Instead of taking <c>ei_cnode</c> as first
argument, it takes a second argument, an
- <c><![CDATA[erlang_pid]]></c>,
+ <c>erlang_pid</c>,
which is to be the process identifier of the sending process
(in the Erlang distribution protocol).</p>
- <p>A suitable <c><![CDATA[erlang_pid]]></c> can be constructed from the
- <c><![CDATA[ei_cnode]]></c> structure by the following example
+ <p>A suitable <c>erlang_pid</c> can be constructed from the
+ <c>ei_cnode</c> structure by the following example
code:</p>
<code type="none"><![CDATA[
ei_cnode ec;
@@ -769,10 +769,10 @@ self->num = fd;
<desc>
<p>Can be used to retrieve information about
the C-node. These values are initially set with
- <c><![CDATA[ei_connect_init()]]></c> or
- <c><![CDATA[ei_connect_xinit()]]></c>.</p>
+ <c>ei_connect_init()</c> or
+ <c>ei_connect_xinit()</c>.</p>
<p>These function simply fetch the appropriate field from the
- <c><![CDATA[ec]]></c>
+ <c>ec</c>
structure. Read the field directly will probably be safe for
a long time, so these functions are not really needed.</p>
</desc>
@@ -788,16 +788,16 @@ self->num = fd;
<c>-relaxed_command_check</c>, which it normally is not.</p>
<p>To unregister a node you have published, you should
close the descriptor that was returned by
- <c><![CDATA[ei_publish()]]></c>.</p>
+ <c>ei_publish()</c>.</p>
<warning>
<p>This function is deprecated and will be removed in a future
release.</p>
</warning>
- <p><c><![CDATA[ec]]></c> is the node structure of the node to
+ <p><c>ec</c> is the node structure of the node to
unregister.</p>
<p>If the node was successfully unregistered from EPMD, the
function returns <c>0</c>. Otherwise, <c>-1</c> is returned and
- <c><![CDATA[erl_errno]]></c> is set to <c><![CDATA[EIO]]></c>.</p>
+ <c>erl_errno</c> is set to <c>EIO</c>.</p>
</desc>
</func>
@@ -818,18 +818,18 @@ self->num = fd;
<p>If a connection attempt fails, the following can be checked:</p>
<list type="bulleted">
- <item><c><![CDATA[erl_errno]]></c>.</item>
+ <item><c>erl_errno</c>.</item>
<item>That the correct cookie was used</item>
<item>That EPMD is running</item>
<item>That the remote Erlang node on the other side is running the
- same version of Erlang as the <c><![CDATA[ei]]></c> library</item>
- <item>That environment variable <c><![CDATA[ERL_EPMD_PORT]]></c>
+ same version of Erlang as the <c>ei</c> library</item>
+ <item>That environment variable <c>ERL_EPMD_PORT</c>
is set correctly</item>
</list>
<p>The connection attempt can be traced by setting a trace level by either
- using <c><![CDATA[ei_set_tracelevel]]></c> or by setting environment
- variable <c><![CDATA[EI_TRACELEVEL]]></c>.
+ using <c>ei_set_tracelevel</c> or by setting environment
+ variable <c>EI_TRACELEVEL</c>.
The trace levels have the following messages:</p>
<list>