mps_send/2 sends a message to a specified port. The port identifier was usually obtained either by name server lookup, or it has been communicated to the sender by an earlier message.
% code on server server(NsrvHost) :- mps_init(NsrvHost), mps_port_allocate(true/0, RequestPort), mps_port_register("SampleServer", "RunGoal", "Sig", RequestPort), server_loop(RequestPort). server_loop(RequestPort) :- repeat, mps_receive(RequestPort, request(Goal, ReplyPort)), once(Goal), mps_send(ReplyPort, Goal), fail. % code on client client_init(NsrvHost, RequestPort-ReplyPort) :- mps_init(NsrvHost), mps_port_allocate(true/0, ReplyPort), repeat, mps_port_lookup("SampleServer", "RunGoal", RequestPort), !. remote_once(RequestPort-ReplyPort, Goal) :- mps_send(RequestPort, request(Goal, ReplyPort)), repeat, mps_receive(ReplyPort, Reply), !, Goal = Reply. % Sample session (client side): [eclipse 1]: [client]. client.pl compiled traceable 624 bytes in 0.00 seconds yes. [eclipse 2]: client_init(breeze, Ports), remote_once(Ports, X is 3+4). Ports = 794820612 - 364511236 X = 7 yes.