Changes between Version 35 and Version 36 of GuiRpc
- Timestamp:
- Aug 15, 2013, 9:37:19 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GuiRpc
v35 v36 1 1 [[PageOutline]] 2 2 3 = Controlling the core client via RPC = 4 5 The BOINC core client provides a set of RPCs (remote procedure calls) for control and state interrogation. 6 This enables the development of GUI (graphical user interface) programs separately from the core client. 3 = Controlling the BOINC client via RPC = 4 5 The BOINC core client provides a set of RPCs (remote procedure calls) 6 for control and state interrogation. 7 This enables the development of GUI (graphical user interface) programs. 7 8 These RPCs send XML request and reply messages over a TCP connection. 8 The XML formats are not documented, but can be deduced from the source code. 9 10 BOINC provides a C++ interface to these RPCs, consisting of the GUI_RPC class. 11 The interface is in [source:boinc/lib/gui_rpc_client.h lib/gui_rpc_client.h], 12 and the program [source:boinc/client/boinc_cmd.cpp boinc_cmd.cpp] gives a usage example. 13 All member functions return an integer error code. 14 It should be fairly easy to generate client interfaces in languages other than C++. 9 The XML formats are not documented, but can be inferred from the source code. 10 11 The following bindings are available: 12 13 * BOINC has a C++ binding, consisting of the GUI_RPC class. 14 The interface is in [source:boinc/lib/gui_rpc_client.h lib/gui_rpc_client.h], 15 and the program [source:boinc/client/boinc_cmd.cpp boinc_cmd.cpp] 16 gives a usage example. 17 All member functions return an integer error code. 18 * BOINC has a Java binding in [source:boinc/android/BOINC/src/edu/berkeley/boinc/rpc/]. 19 * A .Net binding is available at https://boincguirpc.codeplex.com/ 20 21 It should be easy to generate bindings in other languages. 15 22 GUI programs connect to the core client by opening a TCP socket at port 31416. 16 23 They can then do repeated RPCs over this connection. 17 24 Each reply message ends with the character \003. 18 25 19 To create an RPC connection, call 20 21 `init(char* host)`:: 22 Establish RPC connection to the given host. 26 The rest of this document describes the C++ interface. 27 The functions listed are members of the '''RPC_CLIENT''' class. 28 29 == Connecting == 30 31 To establish RPC connection to a host, 32 create a `RPC_CLIENT` object and call 33 {{{ 34 `init(char* host)`. 35 }}} 23 36 24 37 == Dealing with versions == 25 38 26 39 The GUI RPC protocol changes over time. 27 If you're writing a GUI program that needs to communicate with older versions of the BOINC core client, 28 here's what to do: 29 30 * Create a `GUI_RPC` object and connect. 31 Call `exchange_versions()` to get the client version. 40 If you're writing a GUI program that needs to communicate with older 41 versions of the BOINC client: 42 43 * Call `exchange_versions()` to get the client version. 32 44 * If `exchange_versions()` fails (it's not supported in pre-5.6 clients) 33 45 do a `get_state()` RPC, and get the client version from `CC_STATE::version_info`.