Problem with Duplex Streams in Docker Client
Hello!
I am writing a docker client using effect and have ran into a problem regarding duplex streams. The particular endpoint I am struggling with is attaching to a container, which allows you to read its output and send it input. The endpoint "hijacks the HTTP connection to transport stdin, stdout, and stderr on the same socket."
The docker api has some other endpoints, like the one for pulling an image from a remote repository for example, that also return streams - but those are just ReadStreams, not ReadWriteStreams. Those endpoints work just fine, I use the
But for the endpoints that hijack the connection for Duplex streams, is there any way to convert said stream to a duplex stream somehow? Or is there any way to access the underlying socket from the NodeClient http request?
I am writing a docker client using effect and have ran into a problem regarding duplex streams. The particular endpoint I am struggling with is attaching to a container, which allows you to read its output and send it input. The endpoint "hijacks the HTTP connection to transport stdin, stdout, and stderr on the same socket."
The docker api has some other endpoints, like the one for pulling an image from a remote repository for example, that also return streams - but those are just ReadStreams, not ReadWriteStreams. Those endpoints work just fine, I use the
stream property off the the client response from the effect NodeClient http request and it just works. But for the endpoints that hijack the connection for Duplex streams, is there any way to convert said stream to a duplex stream somehow? Or is there any way to access the underlying socket from the NodeClient http request?
