diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-10-21 20:38:28 +0200 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2019-10-21 14:38:28 -0400 |
commit | 6c5a981fd2afad21af73a1345c4e30fb6b30b09a (patch) | |
tree | c6065fe502cc99f29d7f5554257729552920f7f4 /cli/js/lib.deno_runtime.d.ts | |
parent | 1f52c66ced9bed0cae6bff065dfa7563cbfaee29 (diff) |
feat: Deno.listenTLS (#3152)
Diffstat (limited to 'cli/js/lib.deno_runtime.d.ts')
-rw-r--r-- | cli/js/lib.deno_runtime.d.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cli/js/lib.deno_runtime.d.ts b/cli/js/lib.deno_runtime.d.ts index 94b6b61cd..3036ea2d1 100644 --- a/cli/js/lib.deno_runtime.d.ts +++ b/cli/js/lib.deno_runtime.d.ts @@ -990,6 +990,29 @@ declare namespace Deno { */ export function listen(options: ListenOptions): Listener; + export interface ListenTLSOptions { + port: number; + hostname?: string; + transport?: Transport; + certFile: string; + keyFile: string; + } + + /** Listen announces on the local transport address over TLS (transport layer security). + * + * @param options + * @param options.port The port to connect to. (Required.) + * @param options.hostname A literal IP address or host name that can be + * resolved to an IP address. If not specified, defaults to 0.0.0.0 + * @param options.certFile Server certificate file + * @param options.keyFile Server public key file + * + * Examples: + * + * Deno.listenTLS({ port: 443, certFile: "./my_server.crt", keyFile: "./my_server.key" }) + */ + export function listenTLS(options: ListenTLSOptions): Listener; + export interface DialOptions { port: number; hostname?: string; @@ -1018,6 +1041,7 @@ declare namespace Deno { export interface DialTLSOptions { port: number; hostname?: string; + certFile?: string; } /** |