load_history();
- client = osrf_system_get_transport_client();
+ client = osrfSystemGetTransportClient();
/* main process loop */
int newline_needed = 1; /* used as boolean */
return 1;
}
- osrf_app_session* session = osrf_app_client_session_init(server);
+ osrfAppSession* session = osrf_app_client_session_init(server);
if(!osrf_app_session_connect(session)) {
osrfLogWarning( OSRF_LOG_MARK, "Unable to connect to remote service %s\n", server );
}
double start = get_timestamp_millis();
- //int req_id = osrf_app_session_make_request( session, params, method, 1, NULL );
- int req_id = osrf_app_session_make_req( session, params, method, 1, NULL );
+ int req_id = osrfAppSessionMakeRequest( session, params, method, 1, NULL );
- osrf_message* omsg = osrf_app_session_request_recv( session, req_id, recv_timeout );
+
+ osrf_message* omsg = osrfAppSessionRequestRecv( session, req_id, recv_timeout );
if(!omsg)
printf("\nReceived no data from server\n");
}
- omsg = osrf_app_session_request_recv( session, req_id, recv_timeout );
+ omsg = osrfAppSessionRequestRecv( session, req_id, recv_timeout );
}
osrf_app_session_request_finish( session, req_id );
osrf_app_session_disconnect( session );
- osrf_app_session_destroy( session );
+ osrfAppSessionFree( session );
return 1;
static int do_math( int count, int style ) {
- osrf_app_session* session = osrf_app_client_session_init( "opensrf.math" );
+ osrfAppSession* session = osrf_app_client_session_init( "opensrf.math" );
osrf_app_session_connect(session);
jsonObject* params = jsonParseString("[]");
++running;
double start = get_timestamp_millis();
- int req_id = osrf_app_session_make_req( session, params, methods[j], 1, NULL );
- osrf_message* omsg = osrf_app_session_request_recv( session, req_id, 5 );
+ int req_id = osrfAppSessionMakeRequest( session, params, methods[j], 1, NULL );
+ osrf_message* omsg = osrfAppSessionRequestRecv( session, req_id, 5 );
double end = get_timestamp_millis();
times[(4*i) + j] = end - start;
osrf_app_session_disconnect( session );
}
- osrf_app_session_destroy( session );
+ osrfAppSessionFree( session );
jsonObjectFree(params);
int c;