ECLiPSe provides the following predicates to support the remote interface:
The two predicates must be used together, with remote_connect_setup/3 called first. The predicate creates a socket server for remote attachment at host Host and port Port. Socket will be instantiated to the name of the socket server that is created. When the predicate returns, the remote process can request the socket connection at Host/Port address (if the request is issued before remote_connect_setup/3 is called, the server would refuse the connection). The remote process will suspend waiting for the request to be accepted. This will happen when remote_connect_accept/6 is called.
Splitting the attachment into two predicates enables the user to start the remote program in between. This will allow the user to start the remote attachment automatically by executing the remote program from within ECLiPSe with an exec/3 call.
TimeOut specifies the amount of time (in seconds) that the predicate will wait for a remote process to attempt a remote attachment. If no remote attachment request is made in the specified time, the predicate will fail. This time is also used for the time-outs on peer queue connections. To make the predicate block indefinitely waiting for a remote attachment, the atom block can be used for TimeOut.
InitGoal is used to define the optional initialisation on the ECLiPSe side when the two sides are connected. InitGoal will be called immediately after connection, before the two sides are allowed to interact. If no initialisation is desired, then the argument can be left uninstantiated. The result of executing the goal is returned in InitRes, which should be initially left uninstantiated.
PassTerm is the pass-term that is used to verify the connection. The remote side sends a pass-term which is checked to see it is identical to PassTerm. If not, the attachment fails.
Unimplemented functionality error is raised if the remote protocol used by the remote and ECLiPSe sides are incompatible. This can happen if one side is outdated (and using an outdated version of the protocol).
''
) should be used.The predicate does not provide a way to specify a handler for the queue on the peer side. This is because it is not possible to provide a generic way that is independent of peer’s programming language.