From 23e67eb5153bd26dbae471b27dc6a21a6d283b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 18 Jan 2020 21:49:55 +0100 Subject: stabilize net Addr (#3709) Co-authored-by: xiaoxintang <15707971810@163.com> --- cli/js/lib.deno_runtime.d.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'cli/js/lib.deno_runtime.d.ts') diff --git a/cli/js/lib.deno_runtime.d.ts b/cli/js/lib.deno_runtime.d.ts index c4055bc35..6e3e2384a 100644 --- a/cli/js/lib.deno_runtime.d.ts +++ b/cli/js/lib.deno_runtime.d.ts @@ -1307,8 +1307,8 @@ declare namespace Deno { interface Addr { transport: Transport; - /** UNSTABLE: Address is unstable because inconsistent with ConnectOptions. */ - address: string; + hostname: string; + port: number; } /** UNSTABLE: Maybe remove ShutdownMode entirely. */ @@ -1342,21 +1342,19 @@ declare namespace Deno { */ close(): void; /** Return the address of the `Listener`. */ - addr(): Addr; + addr: Addr; [Symbol.asyncIterator](): AsyncIterator; } export interface Conn extends Reader, Writer, Closer { - /** UNSTABLE: return Addr? - * + /** * The local address of the connection. */ - localAddr: string; - /** UNSTABLE: return Addr? - * + localAddr: Addr; + /** * The remote address of the connection. */ - remoteAddr: string; + remoteAddr: Addr; /** The resource ID of the connection. */ rid: number; /** Shuts down (`shutdown(2)`) the reading side of the TCP connection. Most @@ -1426,7 +1424,7 @@ declare namespace Deno { } /** - * Dial connects to the address on the named transport. + * Connects to the address on the named transport. * * @param options * @param options.port The port to connect to. (Required.) -- cgit v1.2.3