summaryrefslogtreecommitdiff
path: root/ext/net/01_net.js
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-03-20 03:03:15 +1000
committerGitHub <noreply@github.com>2024-03-19 18:03:15 +0100
commitb9f8562754f14aecfd87acdecfe8d8c966ccbe4d (patch)
tree1021779db8b1f26546cb900a29d0227a7cc7848e /ext/net/01_net.js
parentb0c687c1d2dc26e8c56f4abb4b6ff5c06a9ed9dc (diff)
chore: rename internal `Datagram` class to `DatagramConn` (#22474)
As having mismatched public and private class names may be confusing, without good reason, to those unfamiliar with the codebase.
Diffstat (limited to 'ext/net/01_net.js')
-rw-r--r--ext/net/01_net.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/net/01_net.js b/ext/net/01_net.js
index 64738dae2..81ff1a50d 100644
--- a/ext/net/01_net.js
+++ b/ext/net/01_net.js
@@ -360,7 +360,7 @@ class Listener {
}
}
-class Datagram {
+class DatagramConn {
#rid = 0;
#addr = null;
#unref = false;
@@ -553,7 +553,7 @@ function createListenDatagram(udpOpFn, unixOpFn) {
args.loopback ?? false,
);
addr.transport = "udp";
- return new Datagram(rid, addr);
+ return new DatagramConn(rid, addr);
}
case "unixpacket": {
const { 0: rid, 1: path } = unixOpFn(args.path);
@@ -561,7 +561,7 @@ function createListenDatagram(udpOpFn, unixOpFn) {
transport: "unixpacket",
path,
};
- return new Datagram(rid, addr);
+ return new DatagramConn(rid, addr);
}
default:
throw new TypeError(`Unsupported transport: '${transport}'`);