mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-11 07:28:08 +03:00
web socket constructor
This commit is contained in:
parent
49f1176591
commit
7cfed6ff23
@ -23,9 +23,10 @@ export class SocketProxy extends Duplex {
|
||||
super({
|
||||
allowHalfOpen: false,
|
||||
})
|
||||
this.socket = new window['__connector__'].Socket(...args)
|
||||
this.socket = window['__connector__'].createSocket(...args)
|
||||
this.socket.connect$.subscribe(() => this['emit']('connect'))
|
||||
this.socket.data$.subscribe(data => this['emit']('data', Buffer.from(data)))
|
||||
this.socket.error$.subscribe(error => this['emit']('error', error))
|
||||
}
|
||||
|
||||
connect (...args: any[]) {
|
||||
|
Loading…
Reference in New Issue
Block a user