summaryrefslogtreecommitdiff
path: root/ext/net/02_tls.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/net/02_tls.js')
-rw-r--r--ext/net/02_tls.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/ext/net/02_tls.js b/ext/net/02_tls.js
index 1411c6d74..5405d68a3 100644
--- a/ext/net/02_tls.js
+++ b/ext/net/02_tls.js
@@ -75,9 +75,25 @@ async function connectTls({
}
class TlsListener extends Listener {
+ #rid = 0;
+
+ constructor(rid, addr) {
+ super(rid, addr);
+ this.#rid = rid;
+ }
+
+ get rid() {
+ internals.warnOnDeprecatedApi(
+ "Deno.TlsListener.rid",
+ new Error().stack,
+ "Use `Deno.TlsListener` instance methods instead.",
+ );
+ return this.#rid;
+ }
+
async accept() {
const { 0: rid, 1: localAddr, 2: remoteAddr } = await op_net_accept_tls(
- this.rid,
+ this.#rid,
);
localAddr.transport = "tcp";
remoteAddr.transport = "tcp";