It should be possible to have the returned Duplex write directly to the socket. Instead of providing a Readable as request body we can provide a function, i.e. the reverse of what we do on the response side in request.enqueue.
This would allow us to entirely bypass the intermediate PassThrough or Readable between the Duplex and the socket.
It should be possible to have the returned
Duplexwrite directly to the socket. Instead of providing aReadableas request body we can provide a function, i.e. the reverse of what we do on the response side inrequest.enqueue.This would allow us to entirely bypass the intermediate
PassThroughorReadablebetween theDuplexand the socket.