From 031f9ca91ade7fbb9e31c82545401b8a5531e539 Mon Sep 17 00:00:00 2001
From: xsipewe This module provides support for communication between distributed
- Erlang nodes and C nodes, in a manner that is transparent to Erlang
+ Erlang nodes and C-nodes, in a manner that is transparent to Erlang
processes. A C node appears to Erlang as a
- hidden node.
+
+ A C-node appears to Erlang as a hidden node.
That is, Erlang processes that know the name of the
- C node are able to communicate with it in a normal manner, but
- the node name will not appear in the listing provided by the
- Erlang function
This function is used by a server process to accept a connection from a client process.
- is set to .
This function closes an open connection to an Erlang node.
+Closes an open connection to an Erlang node.
On success, 0 is returned. If the call fails, a non-zero value - is returned, and the reason for - the error can be obtained with the appropriate platform-dependent - call.
+Returns
These functions set up a connection to an Erlang node.
-Sets up a connection to an Erlang node.
+These functions return an open file descriptor on success, or
- a negative value indicating that an error occurred --- in
- which case they will set
Returns an open file descriptor on success, otherwise a negative
+ value. In the latter case
Additionally,
Also,
Example:
These functions initialize the
Initializes the
If you use
A C node acting as a server will be assigned a creation number +
If you use
A C-node acting as a server is assigned a creation number
when it calls
Example 1:
+Example 1:
when initializing !");
]]>
- Example 2:
+Example 2:
when initializing !");
]]>
These functions are used by a server process to register +
This function is used by a server process to register
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
To unregister with epmd, simply close the returned - descriptor. -
-On success, the functions return a descriptor connecting the
- calling process to epmd. On failure, they return -1 and set
-
To unregister with EPMD, simply close the returned descriptor.
+On success, a descriptor connecting the calling process to EPMD is
+ returned. On failure,
Additionally,
Also,
This function receives a message consisting of a sequence +
Receives a message consisting of a sequence of bytes in the Erlang external format.
-If a tick occurs, i.e., the Erlang node on the
+
+
+
If a tick 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 will return
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 a negative value and will set
+ failure, the function returns a negative value and sets
This function receives the message into the specified buffer,
- and decodes into the
Receives the message into the specified buffer
+ and decodes into
The definition of
If
If
If
An ordinary send operation has occurred and
+
A registered send operation has occurred and
+
A link is broken.
It is the caller's responsibility to release the
- memory pointed to by
If a tick occurs, i.e., the Erlang node on the +
If a tick 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 will return
On success, the function returns
This function sends an Erlang term to a registered process.
-The function returns 1 if successful, otherwise 0 --- in
- which case it will set
Sends an Erlang term to a registered process.
+Returns
These functions support calling Erlang functions on remote nodes.
-
The actual message returned by the rpc server
- is a 2-tuple
Supports calling Erlang functions on remote nodes.
+
The actual message returned by the RPC server
+ is a 2-tuple
It is the caller's responsibility to free the returned
-
When failing,
all three functions set
This function sends an Erlang term to a process.
-The function returns 1 if successful, otherwise 0 --- in
- which case it will set
Sends an Erlang term to a process.
+Returns
These functions can be used to retrieve information about
- the C Node. These values are initially set with
-
Retrieves information about
+ the C-node. These values are initially set with
+
This function can be called by a process to unregister a - specified node from epmd on the localhost. This is however usually not - allowed, unless epmd was started with the -relaxed_command_check - flag, which it normally isn't.
- -To unregister a node you have published, you should instead
- close the descriptor that was returned by
-
To unregister a node you have published, you should instead
+ close the descriptor that was returned by
+
This function is deprecated and will be removed in a future - release.
+ release.If the node was successfully unregistered from epmd, the
- function returns 0. Otherwise, it returns -1 and sets
-
If the node was successfully unregistered from EPMD,
This function is similar to
Similar to
On success, the function returns
These are convenience functions for some common name lookup functions.
+Convenience functions for some common name lookup functions.
If a connection attempt fails, the following can be checked:
+