summaryrefslogtreecommitdiff
path: root/cli/js/ops/tls.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-07-19 19:49:44 +0200
committerGitHub <noreply@github.com>2020-07-19 19:49:44 +0200
commitfa61956f03491101b6ef64423ea2f1f73af26a73 (patch)
treec3800702071ca78aa4dd71bdd0a59a9bbe460bdd /cli/js/ops/tls.ts
parent53adde866dd399aa2509d14508642fce37afb8f5 (diff)
Port internal TS code to JS (#6793)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Diffstat (limited to 'cli/js/ops/tls.ts')
-rw-r--r--cli/js/ops/tls.ts79
1 files changed, 0 insertions, 79 deletions
diff --git a/cli/js/ops/tls.ts b/cli/js/ops/tls.ts
deleted file mode 100644
index 291fe3dd9..000000000
--- a/cli/js/ops/tls.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-
-import { sendAsync, sendSync } from "./dispatch_json.ts";
-
-export interface ConnectTLSRequest {
- transport: "tcp";
- hostname: string;
- port: number;
- certFile?: string;
-}
-
-interface EstablishTLSResponse {
- rid: number;
- localAddr: {
- hostname: string;
- port: number;
- transport: "tcp";
- };
- remoteAddr: {
- hostname: string;
- port: number;
- transport: "tcp";
- };
-}
-
-export function connectTls(
- args: ConnectTLSRequest,
-): Promise<EstablishTLSResponse> {
- return sendAsync("op_connect_tls", args);
-}
-
-interface AcceptTLSResponse {
- rid: number;
- localAddr: {
- hostname: string;
- port: number;
- transport: "tcp";
- };
- remoteAddr: {
- hostname: string;
- port: number;
- transport: "tcp";
- };
-}
-
-export function acceptTLS(rid: number): Promise<AcceptTLSResponse> {
- return sendAsync("op_accept_tls", { rid });
-}
-
-export interface ListenTLSRequest {
- port: number;
- hostname: string;
- transport: "tcp";
- certFile: string;
- keyFile: string;
-}
-
-interface ListenTLSResponse {
- rid: number;
- localAddr: {
- hostname: string;
- port: number;
- transport: "tcp";
- };
-}
-
-export function listenTls(args: ListenTLSRequest): ListenTLSResponse {
- return sendSync("op_listen_tls", args);
-}
-
-export interface StartTLSRequest {
- rid: number;
- hostname: string;
- certFile?: string;
-}
-
-export function startTls(args: StartTLSRequest): Promise<EstablishTLSResponse> {
- return sendAsync("op_start_tls", args);
-}