summaryrefslogtreecommitdiff
path: root/frontend-old/node_modules/protobufjs/src/rpc.js
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2025-11-09 11:15:19 +0800
committeraltaf-creator <dev@altafcreator.com>2025-11-09 11:15:19 +0800
commit8eff962cab608341a6f2fedc640a0e32d96f26e2 (patch)
tree05534d1a720ddc3691d346c69b4972555820a061 /frontend-old/node_modules/protobufjs/src/rpc.js
pain
Diffstat (limited to 'frontend-old/node_modules/protobufjs/src/rpc.js')
-rw-r--r--frontend-old/node_modules/protobufjs/src/rpc.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/frontend-old/node_modules/protobufjs/src/rpc.js b/frontend-old/node_modules/protobufjs/src/rpc.js
new file mode 100644
index 0000000..894e5c7
--- /dev/null
+++ b/frontend-old/node_modules/protobufjs/src/rpc.js
@@ -0,0 +1,36 @@
+"use strict";
+
+/**
+ * Streaming RPC helpers.
+ * @namespace
+ */
+var rpc = exports;
+
+/**
+ * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.
+ * @typedef RPCImpl
+ * @type {function}
+ * @param {Method|rpc.ServiceMethod<Message<{}>,Message<{}>>} method Reflected or static method being called
+ * @param {Uint8Array} requestData Request data
+ * @param {RPCImplCallback} callback Callback function
+ * @returns {undefined}
+ * @example
+ * function rpcImpl(method, requestData, callback) {
+ * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code
+ * throw Error("no such method");
+ * asynchronouslyObtainAResponse(requestData, function(err, responseData) {
+ * callback(err, responseData);
+ * });
+ * }
+ */
+
+/**
+ * Node-style callback as used by {@link RPCImpl}.
+ * @typedef RPCImplCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any, otherwise `null`
+ * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error
+ * @returns {undefined}
+ */
+
+rpc.Service = require("./rpc/service");