(host: string, port: number)
| 227 | } |
| 228 | |
| 229 | socketConnected(host: string, port: number) { |
| 230 | this._writeBytes(Buffer.from([ |
| 231 | 0x05, |
| 232 | SocksReply.Succeeded, |
| 233 | 0x00, // RSV |
| 234 | ...ipToSocksAddress(host), // ATYP, Address |
| 235 | port >> 8, port & 0xFF // Port |
| 236 | ])); |
| 237 | this._socket.on('data', data => this._client.onSocketData({ uid: this._uid, data })); |
| 238 | } |
| 239 | |
| 240 | socketFailed(errorCode: string) { |
| 241 | const buffer = Buffer.from([ |
nothing calls this directly
no test coverage detected