网络层

This commit is contained in:
chen wei bo
2025-08-15 00:36:54 +08:00
parent 80dcd70415
commit 9c67163cfd
28 changed files with 21014 additions and 1382 deletions
@@ -0,0 +1,14 @@
import type { Type } from "protobufjs";
import type { HttpMethod } from "../transport/HttpManager";
export type CodecKind = "json" | "proto";
export interface Endpoint<Req, Res> {
path: string;
method: HttpMethod;
codec: CodecKind;
reqType?: Type; // codec=proto 时必填
resType?: Type; // codec=proto 时必填
needsAuth?: boolean;
lock?: boolean;
}