Changes between Version 7 and Version 8 of BasicApi
- Timestamp:
- Jun 11, 2007, 10:01:38 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BasicApi
v7 v8 51 51 {{{ 52 52 string resolved_name; 53 retval = boinc_resolve_filename ("my_file", resolved_name);53 retval = boinc_resolve_filename_s("my_file", resolved_name); 54 54 if (retval) fail("can't resolve filename"); 55 55 f = fopen(resolved_name.c_str(), "r"); … … 122 122 }}} 123 123 124 This reportsthe results of an application-specific benchmark, expressed as number of floating-point and integer operations per CPU second.124 This lets the application report to the core client the results of an application-specific benchmark, expressed as number of floating-point and integer operations per CPU second. 125 125 126 126 {{{ … … 128 128 }}} 129 129 130 This reports the total number of floating-point and/or integer operations since the start of the result. 131 If floating_point_ops is nonzero, it's used to compute credit and integer_ops is ignored. 130 This lets the application report to the core client the total number of floating-point and/or integer operations since the start of the result. If `floating_point_ops` is nonzero, it's used to compute credit and integer_ops is ignored. 132 131 `boinc_ops_cumulative()` may be called multiple times, but only the last call makes any difference. 133 132 … … 140 139 }}} 141 140 142 The `fraction_done` argument is an estimate of the workunit fraction complete ( 0 to 1). This function is fast and can be called frequently. The sequence of arguments in successive calls should be non-decreasing. An application should never 'reset' and start over if an error occurs; it should exit with an error code.141 The `fraction_done` argument is an estimate of the workunit fraction complete (from 0 to 1). This function is fast and can be called frequently. The sequence of arguments in successive calls should be non-decreasing. An application should never 'reset' and start over if an error occurs; it should exit with an error code. 143 142 144 143 {{{ … … 236 235 == Requesting network connection == 237 236 238 If your application needs to do network communication and it appears that there is no physical network connection (e.g. gethostbyname()fails for a valid name) then:239 240 241 * Periodically call boinc_network_poll()until it returns zero.242 243 237 If your application needs to do network communication and it appears that there is no physical network connection (e.g. `gethostbyname()` fails for a valid name) then: 238 239 * Call `boinc_need_network()`. This will alert the user that a network connection is needed. 240 * Periodically call `boinc_network_poll()` until it returns zero. 241 * Do whatever communication is needed. 242 * When done, call `boinc_network_done()`. This enables that hangup of a modem connection, if needed. 244 243 245 244 {{{