(socket: SOCKET)
| 66 | } |
| 67 | |
| 68 | setSocket(socket: SOCKET): void { |
| 69 | this.keepOpen = true; |
| 70 | this.client.socket = socket; |
| 71 | this.client.socket.onmessage = this.onMessage.bind(this); |
| 72 | this.client.socket.onerror = this.onError.bind(this); |
| 73 | this.client.socket.onclose = this.onClose.bind(this); |
| 74 | this.client.socket.onopen = this.onOpen.bind(this); |
| 75 | this.ensureConnection(); |
| 76 | } |
| 77 | |
| 78 | listen(socket: SOCKET): void { |
| 79 | this.unlisten(); |
no test coverage detected