When I submitted it as a bug, this is what I got. https://github.com/golang/go/issues/55029 By chance, do you know what is a buffering for io.Copy?
On Monday, September 12, 2022 at 5:26:21 PM UTC-4 Jan Mercl wrote: > On Mon, Sep 12, 2022 at 11:16 PM ramki...@hotmail.com > <ramki...@hotmail.com> wrote: > > > > I created a TCP Proxy using io.copy (which creates a splice). Here is > the code. > > > > Proxy TCP Server - https://pastebin.com/iAcFjmV1 > > Regular TCP Server - https://pastebin.com/V6AN7atV > > > > When using telent to port 8080, the proxy starts and everything typed in > the telnet will be returned. After 10 seconds, the connection drop to the > proxy but you can see there is one message/packet lost. > > > > Proxy Logs - https://prnt.sc/u76C3KyeXAI3 > > Telnet Logs - https://prnt.sc/VK9vbmishxi2 > > > > You can see that the proxy ends at the end of when 0 is used in Telnet. > 's' is then sent from the Telnet but it's not seen in the proxy.go as shown > in the screenshot. 'd' 'f' etc are then seen in the proxy.go. > > > > 's' is lost. Is this a bug? > > I think it is - in using io.copy for this job. It's stream oriented > and does not understand packet boundaries. Meaning it can block while > buffering in the middle of a packet, disrupting any handshaking > protocol. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/e9809e2f-5e60-457d-a8b4-8de22669c9afn%40googlegroups.com.