(chunk: Buffer, _encoding, callback)
| 65 | const socket: Duplex = new Duplex({ |
| 66 | read() {}, |
| 67 | write(chunk: Buffer, _encoding, callback) { |
| 68 | writes.push(Buffer.from(chunk)) |
| 69 | queueMicrotask(() => { |
| 70 | if (writes.length === 1) { |
| 71 | socket.push(Buffer.from(reply)) |
| 72 | } else if (cancel) { |
| 73 | socket.destroy() |
| 74 | } else if (writes.length === 2) { |
| 75 | socket.push(Buffer.concat([authenticationOk, backendKeyData, readyForQuery])) |
| 76 | } |
| 77 | }) |
| 78 | callback() |
| 79 | } |
| 80 | }) |
| 81 | tlsOptions.set(socket, undefined) |
| 82 | return { socket, writes } |
nothing calls this directly
no test coverage detected