UNPKG

@ayonli/jsext

Version:

A JavaScript extension package for building strong and modern applications.

11 lines (10 loc) 791 B
import { TcpConnectOptions, TcpSocketStream, UdpBindOptions, UdpConnectOptions, UdpSocket, UdpSocketStream, UnixConnectOptions, UnixSocketStream } from "../net/types.ts"; import { getInternetIp } from "../net/util.ts"; export { getInternetIp }; export type * from "../net/types.ts"; export declare function getMyIp(): Promise<string>; export declare function randomPort(prefer?: number | undefined, hostname?: string | undefined): Promise<number>; export declare function connect(options: TcpConnectOptions): Promise<TcpSocketStream>; export declare function connect(options: UnixConnectOptions): Promise<UnixSocketStream>; export declare function connect(options: UdpConnectOptions): Promise<UdpSocketStream>; export declare function udpSocket(options: UdpBindOptions): Promise<UdpSocket>;