2004-06-09 19:09:16 +00:00
|
|
|
<?php
|
2004-05-24 04:03:34 +00:00
|
|
|
require_once("docutil.php");
|
|
|
|
page_head("Trickle message API");
|
|
|
|
|
|
|
|
echo "
|
|
|
|
<h3>API (application)</h3>
|
|
|
|
<pre>
|
2004-07-08 17:59:46 +00:00
|
|
|
<code>int boinc_send_trickle_up(char* variety, char* text)</code>
|
2004-05-24 04:03:34 +00:00
|
|
|
</pre>
|
2004-07-08 17:59:46 +00:00
|
|
|
sends a trickle message of the given variety.
|
2004-05-24 04:03:34 +00:00
|
|
|
Returns zero if success.
|
|
|
|
<p>
|
|
|
|
<pre>
|
2006-01-06 23:38:49 +00:00
|
|
|
<code>int boinc_receive_trickle_down(char* buf, int len)</code>
|
2004-05-24 04:03:34 +00:00
|
|
|
</pre>
|
|
|
|
receives a trickle message.
|
2006-01-06 23:38:49 +00:00
|
|
|
Returns true (nonzero) if there was a message.
|
2004-05-24 04:03:34 +00:00
|
|
|
Messages are delivered in order.
|
|
|
|
|
|
|
|
<h3>API (server)</h3>
|
|
|
|
|
|
|
|
To handle trickle messages,
|
|
|
|
use the daemon process 'trickle_handler'.
|
|
|
|
You must supply the following function:
|
|
|
|
",html_text("
|
|
|
|
int handle_trickle(TRICKLE_UP&);
|
|
|
|
"),"
|
|
|
|
You may send trickle-down messages, from this function or elsewhere,
|
|
|
|
as follows:
|
|
|
|
",html_text("
|
|
|
|
DB_TRICKLE_DOWN tdown;
|
|
|
|
// ... populate the tdown object
|
|
|
|
tdown.insert();
|
|
|
|
"),"
|
|
|
|
|
|
|
|
|
|
|
|
";
|
|
|
|
page_tail();
|
|
|
|
?>
|