*update dist
This commit is contained in:
parent
08b4bbc893
commit
1d4cb917c5
|
@ -18,9 +18,10 @@ export default class Socket extends Duplex {
|
|||
writable: true;
|
||||
remotePublicKey: Uint8Array;
|
||||
private _emulateWebsocket;
|
||||
addEventListener: typeof this.addListener;
|
||||
removeEventListener: typeof this.removeListener;
|
||||
send: typeof this.write;
|
||||
addEventListener?: typeof this.addListener;
|
||||
removeEventListener?: typeof this.removeListener;
|
||||
send?: typeof this.write;
|
||||
close?: typeof this.end;
|
||||
constructor({ allowHalfOpen, remoteAddress, remotePort, remotePublicKey, write, emulateWebsocket, }?: SocketOptions);
|
||||
private _connecting;
|
||||
get connecting(): boolean;
|
||||
|
|
|
@ -29,6 +29,7 @@ class Socket extends streamx_1.Duplex {
|
|||
this.addEventListener = this.addListener;
|
||||
this.removeEventListener = this.removeListener;
|
||||
this.send = this.write;
|
||||
this.close = this.end;
|
||||
this.addEventListener("data", (data) =>
|
||||
// @ts-ignore
|
||||
this.emit("message", new MessageEvent("data", { data })));
|
||||
|
|
Loading…
Reference in New Issue