*alias write to send to be WS compatible

This commit is contained in:
Derrick Hammer 2023-02-25 22:06:37 -05:00
parent c90e022795
commit 11550659d0
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import { Duplex, DuplexEvents, Callback } from "streamx"; import { Duplex, DuplexEvents, Callback } from "streamx";
import { write } from "fs";
const IPV4 = "IPv4"; const IPV4 = "IPv4";
const IPV6 = "IPv6"; const IPV6 = "IPv6";
@ -102,6 +103,8 @@ export default class Socket extends Duplex {
removeEventListener = this.removeListener; removeEventListener = this.removeListener;
off = this.removeListener; off = this.removeListener;
send = write;
static isIP(input: string): number { static isIP(input: string): number {
if (Socket.isIPv4(input)) { if (Socket.isIPv4(input)) {
return 4; return 4;