Response


Object Hierarchy:

Object hierarchy for Response

Description:

public class Response : Object, Serializable

Inbound RPC envelope — matching Request.id, plus result or error.

After Client.call, check error first. Successful calls put objects in result (never null; omit on the wire when empty) and optional scalars in values (same Gee.ArrayList of boxed GLib.Value as Request.values). File.read-style string payloads may use msg / msg_encode.

Usage Examples

Check error

var resp = yield rpc.call(req);
if (resp.error != null)
GLib.warning("%s", resp.error.message);

Object result

foreach (var obj in resp.result)
stdout.printf("%s\n", obj.get_type().name());

Positional values

if (resp.values.size > 0)
stdout.printf("%d\n", resp.values.get(0).get_int());

See also:

Request, Client


Namespace: OLLMrpc
Package: ollmchat

Content:

Properties:

Static methods:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class GLib.Object