2.4.1. Client Side Stub Sketch

SomeReturnType SomeServerFunction (SomeParameterTypes parameters)
{
  // Create a message that describes the call.
  Message callRequest = new Message ();
  callRequest.put ("SomeServerFunction");
  callRequest.putSomeParameterTypes (parameters);

  // Send the request to the server.
  callRequest.send (ServerAddress);

  // Wait for server reponse.
  Message callResponse = Message.receive (ServerAddress);

  // Extract return value from server response.
  SomeReturnType result = callResponse.getSomeReturnType ();
  return (result);
}