-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
Milestone
Description
Currently, net.Pipe is documented as such:
Pipe creates a synchronous, in-memory, full duplex network connection; both ends implement the Conn interface. Reads on one end are matched with writes on the other, copying data directly between the two; there is no internal buffering.
This behavior occurs because net.Pipe was just a thin wrapper over io.Pipe, which is implemented as being synchronous. However, most network connections are not synchronous as they involve buffering at multiple layers (in the OS, on the wire, etc). Thus, we should switch net.Pipe to act in an asynchronous fashion to better emulate true network connections.
Dr-Terrible, nhooyr, egorse, likebike, theodesp and 7 moreCAFxX and bcmills