4 * Streaming RPC helpers.
10 * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.
13 * @param {Method|rpc.ServiceMethod<Message<{}>,Message<{}>>} method Reflected or static method being called
14 * @param {Uint8Array} requestData Request data
15 * @param {RPCImplCallback} callback Callback function
16 * @returns {undefined}
18 * function rpcImpl(method, requestData, callback) {
19 * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code
20 * throw Error("no such method");
21 * asynchronouslyObtainAResponse(requestData, function(err, responseData) {
22 * callback(err, responseData);
28 * Node-style callback as used by {@link RPCImpl}.
29 * @typedef RPCImplCallback
31 * @param {Error|null} error Error, if any, otherwise `null`
32 * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error
33 * @returns {undefined}
36 rpc.Service = require("./rpc/service");