Changes between Version 4 and Version 5 of GuiRpcProtocol


Ignore:
Timestamp:
May 15, 2008, 5:51:41 PM (17 years ago)
Author:
Nicolas
Comment:

Some more work on this documentation. Added a whole new section with the basic protocol structure (moving some information from the introduction).

Legend:

Unmodified
Added
Removed
Modified
  • GuiRpcProtocol

    v4 v5  
    22= GUI RPC protocol =
    33
    4 BOINC uses the GUI RPC protocol to make the BOINC Manager communicate with the core client. The protocol is based on XML. Both requests and responses are terminated with the control character `0x03`. Requests are inside `<boinc_gui_rpc_request>` tags, and replies from the client are inside `<boinc_gui_rpc_reply>` tags. A response is never sent without getting a request first.
     4BOINC uses the GUI RPC protocol to make the BOINC Manager communicate with the core client.
    55
    6 Note that the RPC '''server''' is the core client, and the RPC '''client''' is a GUI or add-on communicating with it (such as BOINC Manager). It may seem confusing. This terminology will be used on the rest of the page.
     6Note that the RPC '''server''' is the core client, and the RPC '''client''' is a GUI or add-on communicating with it (such as BOINC Manager). This may seem confusing. This terminology will be used on the rest of the page.
     7
     8== Basic structure ==
     9
     10The protocol is based on XML, and it's strictly request-reply. The client sends requests to the server, and waits for a reply; a reply is never sent back by the server without getting a request first. Both requests and replies are terminated with the control character `0x03`. Requests are inside `<boinc_gui_rpc_request>` elements, and replies from the client are inside `<boinc_gui_rpc_reply>` elements (in both cases there is a %x03 byte after the closing tag).
     11
     12Note that the core client (RPC server) doesn't support pipelining of requests (pipelining means sending a batch of multiple requests without waiting for a reply, then getting all the replies together; this improves latency). For compatibility, pipelining must not be used.
     13
     14If a command requires [#auth authentication] but the client hasn't authenticated yet, the RPC server will reply
     15{{{
     16#!xml
     17<boinc_gui_rpc_reply>
     18    <unauthorized/>
     19</boinc_gui_rpc_reply>
     20}}}
     21The client should be prepared to receive this in reply to any command.
     22
     23Successful commands usually get the reply:
     24{{{
     25#!xml
     26<boinc_gui_rpc_reply>
     27    <success/>
     28</boinc_gui_rpc_reply>
     29}}}
     30although individual commands may specify a different reply. For example, any command where the client is requesting information from the server would get that extra information in the command reply, instead of {{{<success/>}}}.
     31
     32If a command isn't successful, the reply is:
     33{{{
     34#!xml
     35<boinc_gui_rpc_reply>
     36    <error>human-readable error message</error>
     37</boinc_gui_rpc_reply>
     38}}}
     39A notable error message is "unrecognized op", which is returned if the server doesn't recognize a command.
    740
    841== Authentication == #auth
     
    1043The RPC protocol allows the RPC client to authenticate itself using a password. Most RPC operations can only be done by an authenticated client. Some can be done without authentication, but only by a client running on the same machine.
    1144
    12 Authentication on the RPC protocol is based on a challenge-response system. To initiate the authentication process, send an <code><auth1/></code> command:
     45Authentication on the RPC protocol is password-based, and negotiated with a challenge-response system. To initiate the authentication process, send an {{{<auth1/>}}} command:
    1346{{{
    1447#!xml