Commit 9aeaa05d authored by nanahira's avatar nanahira

larger looplimit

parent 55afc8da
......@@ -8,7 +8,7 @@ import net from "net";
class Handler {
handler: (buffer: Buffer, info: any, datas: Buffer[], params: any) => Promise<boolean>;
private handler: (buffer: Buffer, info: any, datas: Buffer[], params: any) => Promise<boolean>;
synchronous: boolean;
constructor(handler: (buffer: Buffer, info: any, datas: Buffer[], params: any) => Promise<boolean>, synchronous: boolean) {
this.handler = handler;
......@@ -46,14 +46,32 @@ export interface HandleResult {
feedback: Feedback;
}
export interface Constants {
TYPES: Record<string, number>;
RACES: Record<string, number>;
ATTRIBUTES: Record<string, number>;
LINK_MARKERS: Record<string, number>;
DUEL_STAGE: Record<string, number>;
COLORS: Record<string, number>;
TIMING: Record<string, string>;
NETWORK: Record<string, string>;
NETPLAYER: Record<string, string>;
CTOS: Record<string, string>;
STOC: Record<string, string>;
PLAYERCHANGE: Record<string, string>;
ERRMSG: Record<string, string>;
MODE: Record<string, string>;
MSG: Record<string, string>;
}
export class YGOProMessagesHelper {
handlers: HandlerList;
structs: Map<string, Struct>;
structs_declaration: any;
typedefs: any;
proto_structs: any;
constants: any;
structs_declaration: Record<string, Struct>;
typedefs: Record<string, string>;
proto_structs: Record<'CTOS' | 'STOC', Record<string, string>>;
constants: Constants;
singleHandleLimit: number;
constructor(singleHandleLimit?: number) {
......
......@@ -8,7 +8,7 @@ loadJSON = require('load-json-file').sync
@i18ns = loadJSON './data/i18n.json'
YGOProMessagesHelper = require("./YGOProMessages.js").YGOProMessagesHelper # 为 SRVPro2 准备的库,这里拿这个库只用来测试,SRVPro1 对异步支持不是特别完善,因此不会有很多异步优化
@helper = new YGOProMessagesHelper()
@helper = new YGOProMessagesHelper(9000)
@structs = @helper.structs
@structs_declaration = @helper.structs_declaration
......
......@@ -16,7 +16,7 @@
YGOProMessagesHelper = require("./YGOProMessages.js").YGOProMessagesHelper; // 为 SRVPro2 准备的库,这里拿这个库只用来测试,SRVPro1 对异步支持不是特别完善,因此不会有很多异步优化
this.helper = new YGOProMessagesHelper();
this.helper = new YGOProMessagesHelper(9000);
this.structs = this.helper.structs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment