The BOINC core client provides a set of RPCs (remote procedure calls) for control and state interrogation. This will enable the development of GUI (graphical user interface) programs separately from the core client. This will make it easier to develop new GUIs, and will eliminate security issues related to having GUI code in the core client.
BOINC provides a C++ interface to these RPCs.
The interface is based on the GUI_RPC class,
which provides the following functions
(the code is in lib/gui_rpc_client.h
,
and the program gui_test.C
gives a usage example):
";
list_start();
list_heading("function ", "description");
list_item_func(
"init(char* host)",
"Establish RPC connection to the given host"
);
list_item_func(
"get_state(CC_STATE&)",
"Get the core client's 'static' state,
i.e. its projects, apps, app_versions, workunits and results.
This call is relatively slow and should only
be done initially, and when needed later (see below).
"
);
list_item_func(
"get_results(RESULTS&)",
"Get a list of results.
Those that are in progress will have information
such as CPU time and fraction done.
Each result includes a name;
use CC_STATE::lookup_result() to find this result in
the current static state;
if it's not there, call get_state() again.
"
);
list_item_func(
"get_file_transfers(FILE_TRANSFERS&)",
"Get a list of file transfers in progress.
Each is linked by name to a project;
use CC_STATE::lookup_project() to find this project in the current state;
if it's not there, call get_state() again."
);
list_item_func(
"get_project_status(vector
The RPC mechanism uses XML requests and replies.
It should be easy fairly easy to generate client
interfaces in languages other than C++.
GUI programs connect to the core client by opening a TCP socket at port 31416.
They can then do repeated RPCs over this connection.
Each reply message ends with the character '\\003.
";
page_tail();
?>
op
is one of
\"suspend\",
\"resume\",
\"reset\",
\"detach\", or
\"update\".
"
);
list_item_func(
"project_attach(char* url, char* account_id)",
"Attach to the given project"
);
list_item_func(
"set_run_mode(int mode)",
"Set the run mode (never/auto/always)."
);
list_item_func(
"get_run_mode(int& mode)",
"Get the run mode (never/auto/always)."
);
list_item_func(
"set_network_mode(int mode)",
"Set the network mode (never/auto/always)."
);
list_item_func(
"run_benchmarks()",
"Run benchmarks"
);
list_item_func(
"set_proxy_settings(PROXY_INFO&)",
"Set proxy settings"
);
list_item_func(
"get_proxy_settings(PROXY_INFO&)",
"Get proxy settings"
);
list_item_func(
"get_messages(
int seqno,
vectorop
is one of
\"abort\" or
\"retry\".
"
);
list_item_func(
"result_op(FILE_TRANSFER&, char* op)",
"Perform a control operation on an active result.
op
is one of
\"suspend\",
\"resume\", or
\"abort\".
"
);
list_end();
echo "