From ab981035034f775ff559e0c6f2d26c5775110bba Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 25 Feb 2023 01:51:35 -0500 Subject: [PATCH] *Alias addListener and removeListener to have WS compatible API methods --- src/socket.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/socket.ts b/src/socket.ts index 1ed90f8..589f30a 100644 --- a/src/socket.ts +++ b/src/socket.ts @@ -96,6 +96,10 @@ export default class Socket extends Duplex { family: this.remoteFamily, }; } + + addEventListener = this.addListener; + removeEventListener = this.removeListener; + static isIP(input: string): number { if (Socket.isIPv4(input)) { return 4;