@arifwidianto/rpc-agent
Version:
RPC Agent for both client and server, extends more methods easily
23 lines (22 loc) • 643 B
TypeScript
export type PrimitiveType = "string" | "number" | "boolean" | "object" | "array" | "null";
export type JSONPrimitive = string | number | boolean | null | undefined;
export type JSONArray = JSONValue[];
export type JSONObject = {
[key: string]: JSONValue;
};
export type JSONValue = string | number | boolean | null | undefined | JSONValue[] | {
[key: string]: JSONValue;
};
export declare enum Protocol {
TCP = "tcp",
UDP = "udp"
}
export interface ProtocolConfig {
protocolType: Protocol;
host: string;
port: number;
timeout?: number;
}
export interface CreateAgentOptions {
protocols: ProtocolConfig[];
}