Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
38 lines
696 B
Plaintext
38 lines
696 B
Plaintext
import { Context } from "../../context.js";
|
|
//#region src/helper/conninfo/types.d.ts
|
|
export type AddressType = 'IPv6' | 'IPv4' | undefined;
|
|
export type NetAddrInfo = {
|
|
/**
|
|
* Transport protocol type
|
|
*/
|
|
transport?: 'tcp' | 'udp';
|
|
/**
|
|
* Transport port number
|
|
*/
|
|
port?: number;
|
|
address?: string;
|
|
addressType?: AddressType;
|
|
} & ({
|
|
/**
|
|
* Host name such as IP Addr
|
|
*/
|
|
address: string;
|
|
/**
|
|
* Host name type
|
|
*/
|
|
addressType: AddressType;
|
|
} | {});
|
|
/**
|
|
* HTTP Connection information
|
|
*/
|
|
export interface ConnInfo {
|
|
/**
|
|
* Remote information
|
|
*/
|
|
remote: NetAddrInfo;
|
|
}
|
|
/**
|
|
* Helper type
|
|
*/
|
|
export type GetConnInfo = (c: Context) => ConnInfo;
|
|
//#endregion |