@ayonli/jsext
Version:
A JavaScript extension package for building strong and modern applications.
9 lines (8 loc) • 717 B
TypeScript
import { TcpConnectOptions, TcpSocketStream, UdpBindOptions, UdpConnectOptions, UdpSocket, UdpSocketStream, UnixConnectOptions, UnixSocketStream } from "../net/types.ts";
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>;