diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-01-18 18:35:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-18 18:35:12 +0100 |
commit | 34b99fec8edcff7d3b667f273afea69df15e4d5e (patch) | |
tree | 108ea1800b83641023baede5bf9bceba8238f203 /cli/js/net_test.ts | |
parent | 4f1fa82d1d0458170039d4809c3879993659e560 (diff) |
rename dial to connect and dialTLS to connectTLS (#3710)
Diffstat (limited to 'cli/js/net_test.ts')
-rw-r--r-- | cli/js/net_test.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cli/js/net_test.ts b/cli/js/net_test.ts index 926571c82..ec395bc1d 100644 --- a/cli/js/net_test.ts +++ b/cli/js/net_test.ts @@ -6,7 +6,7 @@ testPerm({ net: true }, function netListenClose(): void { const addr = listener.addr(); assertEquals(addr.transport, "tcp"); // TODO(ry) Replace 'address' with 'hostname' and 'port', similar to - // DialOptions and ListenOptions. + // ConnectOptions and ListenOptions. assertEquals(addr.address, "127.0.0.1:4500"); listener.close(); }); @@ -57,7 +57,7 @@ testPerm({ net: true }, async function netDialListen(): Promise<void> { conn.close(); } ); - const conn = await Deno.dial({ hostname: "127.0.0.1", port: 4500 }); + const conn = await Deno.connect({ hostname: "127.0.0.1", port: 4500 }); assertEquals(conn.remoteAddr, "127.0.0.1:4500"); assert(conn.localAddr != null); const buf = new Uint8Array(1024); @@ -99,7 +99,7 @@ testPerm({ net: true }, async function netListenAsyncIterator(): Promise<void> { } }; runAsyncIterator(); - const conn = await Deno.dial("127.0.0.1:4500"); + const conn = await Deno.connect("127.0.0.1:4500"); const buf = new Uint8Array(1024); const readResult = await conn.read(buf); assertEquals(3, readResult); @@ -136,7 +136,7 @@ testPerm({ net: true }, async function netCloseReadSuccess() { conn.close(); closeDeferred.resolve(); }); - const conn = await Deno.dial(addr); + const conn = await Deno.connect(addr); conn.closeRead(); // closing read closeReadDeferred.resolve(); const buf = new Uint8Array(1024); @@ -160,7 +160,7 @@ testPerm({ net: true }, async function netDoubleCloseRead() { await closeDeferred.promise; conn.close(); }); - const conn = await Deno.dial(addr); + const conn = await Deno.connect(addr); conn.closeRead(); // closing read let err; try { @@ -188,7 +188,7 @@ testPerm({ net: true }, async function netCloseWriteSuccess() { await closeDeferred.promise; conn.close(); }); - const conn = await Deno.dial(addr); + const conn = await Deno.connect(addr); conn.closeWrite(); // closing write const buf = new Uint8Array(1024); // Check read not impacted @@ -222,7 +222,7 @@ testPerm({ net: true }, async function netDoubleCloseWrite() { await closeDeferred.promise; conn.close(); }); - const conn = await Deno.dial(addr); + const conn = await Deno.connect(addr); conn.closeWrite(); // closing write let err; try { |