UNPKG

padlocal-client-ts

Version:
23 lines (22 loc) 744 B
import { Host as PBHost } from "../proto/padlocal_pb"; export declare class Host { host: string; port: number; quality: number; initialQuality: number; constructor(host: string, port: number, quality: number); } export declare class HostResolver { /** * host is initialized with 5 quality gaps, so that each host will get three times to retry while connect error occurs. * To against * @param pbHostList */ static hostListFromPBHost(pbHostList: Array<PBHost>): Array<Host>; static adjustHostQuality(host: Host, connectSuccess: boolean): void; /** * select host with the highest quality * @param hostList */ static selectBestHostFromList(hostList: Array<Host>): Host; }