summaryrefslogtreecommitdiff
path: root/std/ws/mod.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-01-18 18:35:12 +0100
committerGitHub <noreply@github.com>2020-01-18 18:35:12 +0100
commit34b99fec8edcff7d3b667f273afea69df15e4d5e (patch)
tree108ea1800b83641023baede5bf9bceba8238f203 /std/ws/mod.ts
parent4f1fa82d1d0458170039d4809c3879993659e560 (diff)
rename dial to connect and dialTLS to connectTLS (#3710)
Diffstat (limited to 'std/ws/mod.ts')
-rw-r--r--std/ws/mod.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/ws/mod.ts b/std/ws/mod.ts
index c256f58ad..96ba4df62 100644
--- a/std/ws/mod.ts
+++ b/std/ws/mod.ts
@@ -484,10 +484,10 @@ export async function connectWebSocket(
let conn: Conn;
if (url.protocol === "http:" || url.protocol === "ws:") {
const port = parseInt(url.port || "80");
- conn = await Deno.dial({ hostname, port });
+ conn = await Deno.connect({ hostname, port });
} else if (url.protocol === "https:" || url.protocol === "wss:") {
const port = parseInt(url.port || "443");
- conn = await Deno.dialTLS({ hostname, port });
+ conn = await Deno.connectTLS({ hostname, port });
} else {
throw new Error("ws: unsupported protocol: " + url.protocol);
}