/** True if we have received a 'request complete' message from our request */
int complete;
/** Our original request payload */
- osrf_message* payload;
+ osrfMessage* payload;
/** List of responses to our request */
- osrf_message* result;
+ osrfMessage* result;
/* if set to true, then a call that is waiting on a response, will reset the
timeout and set this variable back to false */
*/
int osrfAppSessionMakeRequest(
osrfAppSession* session, const jsonObject* params,
- const char* method_name, int protocol, string_array* param_strings);
+ const char* method_name, int protocol, osrfStringArray* param_strings);
/** Sets the given request to complete state */
void osrf_app_session_set_complete( osrfAppSession* session, int request_id );
int osrf_app_session_request_complete( const osrfAppSession* session, int request_id );
/** Does a recv call on the given request */
-osrf_message* osrfAppSessionRequestRecv(
+osrfMessage* osrfAppSessionRequestRecv(
osrfAppSession* session, int request_id, int timeout );
/** Removes the request from the request set and frees the reqest */
/** pushes the given message into the result list of the app_request
* whose request_id matches the messages thread_trace
*/
-int osrf_app_session_push_queue( osrfAppSession*, osrf_message* msg );
+int osrf_app_session_push_queue( osrfAppSession*, osrfMessage* msg );
/** Attempts to connect to the remote service. Returns 1 on successful
* connection, 0 otherwise.
static transport_client* client = NULL;
/* the last result we received */
-static osrf_message* last_result = NULL;
+static osrfMessage* last_result = NULL;
/* functions */
static int parse_request( char* request );
int req_id = osrfAppSessionMakeRequest( session, params, method, 1, NULL );
jsonObjectFree(params);
- osrf_message* omsg = osrfAppSessionRequestRecv( session, req_id, recv_timeout );
+ osrfMessage* omsg = osrfAppSessionRequestRecv( session, req_id, recv_timeout );
if(!omsg)
printf("\nReceived no data from server\n");
double start = get_timestamp_millis();
int req_id = osrfAppSessionMakeRequest( session, params, methods[j], 1, NULL );
- osrf_message* omsg = osrfAppSessionRequestRecv( session, req_id, 5 );
+ osrfMessage* omsg = osrfAppSessionRequestRecv( session, req_id, 5 );
double end = get_timestamp_millis();
times[(4*i) + j] = end - start;