There are two ways to initiate a request, using either the invoke or send method defined by the Request class. The IDL prototypes for these two operations ar as follows:
ORBStatus invoke( in Flags invoke_flags ); ORBStatus send( in Flags send_flags );
The invoke method calls the ORB, which handles the remote method invocation and returns the result. This method will block while awaiting return of the result.
The send method calls the ORB but does not wait for the operation to complete before returning. To determine when the operation is complete, the client must call the get_response method (also defined by the Request class), which has this IDL prototype:
ORBStatus get_response( in Flags response_flags );
The following flag is defined for get_response:
RESP_NO_WAIT Means that the caller does not want to wait for a
response.
get_response determines whether a request has competed. If the RESP_NO_WAIT flag is set, get_response returns immediately even if the request is still in progress. If RESP_NO_WAIT is not set, get_response waits until the request is done before returning.