This module provides support for communication between distributed Erlang nodes and C-nodes, in a manner that is transparent to Erlang processes.
A C-node appears to Erlang as a hidden node.
That is, Erlang processes that know the name of the
C-node can communicate with it in a normal manner, but
the node name does not appear in the listing provided by
This function is used by a server process to accept a connection from a client process.
On success,
Closes an open connection to an Erlang node.
Returns
Sets up a connection to an Erlang node.
Returns an open file descriptor on success, otherwise a negative
value. In the latter case
Also,
Example:
Initializes the
If you use
A C-node acting as a server is assigned a creation number
when it calls
Example 1:
when initializing !");
]]>
Example 2:
when initializing !");
]]>
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 this function, the process should
have called
To unregister with EPMD, simply close the returned descriptor.
On success, a descriptor connecting the calling process to EPMD is
returned. On failure,
Also,
Receives a message consisting of a sequence of bytes in the Erlang external format.
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 returns
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 sets
Receives the message into the specified buffer
and decodes into
The definition of
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, 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
On success, the function returns
Sends an Erlang term to a registered process.
Returns
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
Sends an Erlang term to a process.
Returns
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 local host. This is, however, usually
not allowed, unless EPMD was started with flag
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.
If the node was successfully unregistered from EPMD,
Similar to
On success, the function returns
Convenience functions for some common name lookup functions.
If a connection attempt fails, the following can be checked: