*Update dist
This commit is contained in:
parent
b3a7c0b4e1
commit
b14509d6f1
|
@ -42,7 +42,8 @@ export default class Peer {
|
||||||
private _onsend;
|
private _onsend;
|
||||||
private _onclose;
|
private _onclose;
|
||||||
private _emulateWebsocket;
|
private _emulateWebsocket;
|
||||||
private _channel?;
|
|
||||||
constructor({ proxy, peer, muxer, onopen, onreceive, onsend, onclose, emulateWebsocket, }: PeerOptionsWithProxy & DataSocketOptions);
|
constructor({ proxy, peer, muxer, onopen, onreceive, onsend, onclose, emulateWebsocket, }: PeerOptionsWithProxy & DataSocketOptions);
|
||||||
|
private _channel?;
|
||||||
|
get channel(): any;
|
||||||
init(): Promise<void>;
|
init(): Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ class Peer {
|
||||||
_onsend;
|
_onsend;
|
||||||
_onclose;
|
_onclose;
|
||||||
_emulateWebsocket;
|
_emulateWebsocket;
|
||||||
_channel;
|
|
||||||
constructor({ proxy, peer, muxer, onopen, onreceive, onsend, onclose, emulateWebsocket = false, }) {
|
constructor({ proxy, peer, muxer, onopen, onreceive, onsend, onclose, emulateWebsocket = false, }) {
|
||||||
this._proxy = proxy;
|
this._proxy = proxy;
|
||||||
this._peer = peer;
|
this._peer = peer;
|
||||||
|
@ -26,6 +25,10 @@ class Peer {
|
||||||
this._onclose = onclose?.bind(undefined, this);
|
this._onclose = onclose?.bind(undefined, this);
|
||||||
this._emulateWebsocket = emulateWebsocket;
|
this._emulateWebsocket = emulateWebsocket;
|
||||||
}
|
}
|
||||||
|
_channel;
|
||||||
|
get channel() {
|
||||||
|
return this._channel;
|
||||||
|
}
|
||||||
async init() {
|
async init() {
|
||||||
const write = async (data, cb) => {
|
const write = async (data, cb) => {
|
||||||
pipe.send(data);
|
pipe.send(data);
|
||||||
|
|
Loading…
Reference in New Issue