Add native module loading and improve logging

Loaded a native module in NTQQGroupApi and added test calls to sendSsoCmdReqByContend with different parameter types. Changed fileLog default to true in config. Enhanced NativePacketClient with detailed send/receive logging. Updated NodeIKernelMsgService to accept unknown type for sendSsoCmdReqByContend param. Added process PID logging in napcat shell.
This commit is contained in:
手瓜一十雪 committed 2025-10-26 20:05:21 +08:00
1 parent 9ce9e46c57
commit f9c9b3a852
5 files changed
+10 -3

No files matched your search

+6 -1
View File
@@ -13,11 +13,12 @@ import {
Peer,
ChatType,
} from '@/core';
import { isNumeric, solveAsyncProblem } from '@/common/helper';
import { isNumeric, sleep, solveAsyncProblem } from '@/common/helper';
import { LimitedHashTable } from '@/common/message-unique';
import { NTEventWrapper } from '@/common/event';
import { CancelableTask, TaskExecutor } from '@/common/cancel-task';
import { createGroupDetailInfoV2Param, createGroupExtFilter, createGroupExtInfo } from '../data';
import { dlopen } from 'node:process';
export class NTQQGroupApi {
context: InstanceContext;
@@ -48,6 +49,10 @@ export class NTQQGroupApi {
async initApi() {
this.initCache().then().catch(e => this.context.logger.logError(e));
let napcatNativeModule = { exports: {} };
dlopen(napcatNativeModule, "E:\\NewDevelop\\Napi2Native\\build\\Release\\napi2native.node");
console.log(await this.context.session.getMsgService().sendSsoCmdReqByContend('OidbSvcTrpcTcp.0xed3_1', '0aed030100000000000000000000000000000000000000000000000000000000'));
console.log(await this.context.session.getMsgService().sendSsoCmdReqByContend('OidbSvcTrpcTcp.0xed3_1', Buffer.from('0aed030100000000000000000000000000000000000000000000000000000000', 'hex')));
}
async createGrayTip(groupCode: string, tip: string) {