mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
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.
This commit is contained in:
parent
b0c687c1d2
commit
b9f8562754
1 changed files with 3 additions and 3 deletions
|
@ -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}'`);
|
||||
|
|
Loading…
Reference in a new issue