feat(protocol): implement OIDB 0xcde_2 (RequestDbKey) (#69)

This commit is contained in:
H3CoF6 authored and GitHub committed 2026-05-28 15:18:06 +08:00
1 parent f2b7ef0056
commit 00ca582f1a
6 files changed
+146 -2

No files matched your search

+11 -1
View File
@@ -117,9 +117,19 @@ export async function invokeOidb<TCtx extends OidbSender, TReq, TResp, TParams,
: `OidbSvcTrpcTcp.0x${spec.command.toString(16)}_${subCommand}`;
const result = await ctx.sendRawPacket(wireName, reqBytes, timeoutMs);
if (!result.success) throw new Error(result.errorMessage || 'packet send failed');
if (!result.gotResponse) throw new Error(result.errorMessage || 'no response');
if (!result.success) {
if (result.errorCode && result.errorCode !== 0) {
throw new OidbError(
result.errorCode,
result.errorMessage || '',
spec.command,
subCommand
);
}
}
const respBytes = result.responseData ?? new Uint8Array(0);
if (respBytes.length > 0) {
const meta = protobuf_decode<OidbBaseMeta>(respBytes);