Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-28 Thread Brian Candler
On Tuesday, 28 April 2020 21:09:38 UTC+1, Liam wrote: > > The Linux kernel has TLS; one reason is to allow sendfile(2) with TLS. But > I guess Go doesn't enable that yet? > > https://www.kernel.org/doc/html/latest/networking/tls.html > > https://blog.filippo.io/playing-with-kernel-tls-in-linux-4-1

Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-28 Thread Liam
The Linux kernel has TLS; one reason is to allow sendfile(2) with TLS. But I guess Go doesn't enable that yet? https://www.kernel.org/doc/html/latest/networking/tls.html On Tuesday, April 28, 2020 at 12:39:04 PM UTC-7, Robert Engels wrote: > > Depends on how the file descriptor is implemented.

Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-28 Thread Robert Engels
Depends on how the file descriptor is implemented. But the end result probably has the same performance unless the network card is doing the TLS - which is possible. > On Apr 28, 2020, at 2:21 PM, Tamás Gulácsi wrote: > >  > TLS needs encyption, not jost "shoveling the bytes" to the underlyi

Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-28 Thread Tamás Gulácsi
TLS needs encyption, not jost "shoveling the bytes" to the underlying connection. -- 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...@googleg

Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-28 Thread Liam
On Tuesday, April 28, 2020 at 1:42:15 AM UTC-7, Liam wrote: > > > > On Tuesday, April 28, 2020 at 12:05:00 AM UTC-7, Liam wrote: >> >> >> >> On Monday, April 27, 2020 at 10:00:52 PM UTC-7, Ian Lance Taylor wrote: >>> >>> On Mon, Apr 27, 2020 at 6:59 PM Liam wrote: >>> > >>> > On Monday, April

Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-28 Thread Liam
On Tuesday, April 28, 2020 at 12:05:00 AM UTC-7, Liam wrote: > > > > On Monday, April 27, 2020 at 10:00:52 PM UTC-7, Ian Lance Taylor wrote: >> >> On Mon, Apr 27, 2020 at 6:59 PM Liam wrote: >> > >> > On Monday, April 27, 2020 at 5:56:52 PM UTC-7, Ian Lance Taylor wrote: >> >> >> >> On Mon,

Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-28 Thread Liam
On Monday, April 27, 2020 at 10:00:52 PM UTC-7, Ian Lance Taylor wrote: > > On Mon, Apr 27, 2020 at 6:59 PM Liam > > wrote: > > > > On Monday, April 27, 2020 at 5:56:52 PM UTC-7, Ian Lance Taylor wrote: > >> > >> On Mon, Apr 27, 2020 at 5:10 PM Liam wrote: > >> > > >> > On Monday, April 2

Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-27 Thread Ian Lance Taylor
On Mon, Apr 27, 2020 at 6:59 PM Liam wrote: > > On Monday, April 27, 2020 at 5:56:52 PM UTC-7, Ian Lance Taylor wrote: >> >> On Mon, Apr 27, 2020 at 5:10 PM Liam wrote: >> > >> > On Monday, April 27, 2020 at 4:22:41 PM UTC-7, Ian Lance Taylor wrote: >> >> >> >> On Sun, Apr 26, 2020 at 4:55 PM Lia

Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-27 Thread Liam
On Monday, April 27, 2020 at 5:56:52 PM UTC-7, Ian Lance Taylor wrote: > > On Mon, Apr 27, 2020 at 5:10 PM Liam > > wrote: > > > > On Monday, April 27, 2020 at 4:22:41 PM UTC-7, Ian Lance Taylor wrote: > >> > >> On Sun, Apr 26, 2020 at 4:55 PM Liam wrote: > >> > > >> > During an io.Copy()

Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-27 Thread Liam
On Monday, April 27, 2020 at 5:56:52 PM UTC-7, Ian Lance Taylor wrote: > > On Mon, Apr 27, 2020 at 5:10 PM Liam > > wrote: > > > > On Monday, April 27, 2020 at 4:22:41 PM UTC-7, Ian Lance Taylor wrote: > >> > >> On Sun, Apr 26, 2020 at 4:55 PM Liam wrote: > >> > > >> > During an io.Copy()

Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-27 Thread Ian Lance Taylor
On Mon, Apr 27, 2020 at 5:10 PM Liam wrote: > > On Monday, April 27, 2020 at 4:22:41 PM UTC-7, Ian Lance Taylor wrote: >> >> On Sun, Apr 26, 2020 at 4:55 PM Liam wrote: >> > >> > During an io.Copy() where the Writer is a TCPConn and the Reader is a 200K >> > disk file, my code may concurrently W

Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-27 Thread Liam
On Monday, April 27, 2020 at 4:22:41 PM UTC-7, Ian Lance Taylor wrote: > > On Sun, Apr 26, 2020 at 4:55 PM Liam > > wrote: > > > > During an io.Copy() where the Writer is a TCPConn and the Reader is a > 200K disk file, my code may concurrently Write() on the same TCPConn. > > > > I see the

Re: [go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-27 Thread Ian Lance Taylor
On Sun, Apr 26, 2020 at 4:55 PM Liam wrote: > > During an io.Copy() where the Writer is a TCPConn and the Reader is a 200K > disk file, my code may concurrently Write() on the same TCPConn. > > I see the result of the Write() inserted into the result of the io.Copy(). I > had the impression that

[go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-26 Thread Tamás Gulácsi
Yes you should. Just test it with -race! -- 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

[go-nuts] Concurrent io.Copy(tcpConn, file) and tcpConn.Write(...)

2020-04-26 Thread Liam
During an io.Copy() where the Writer is a TCPConn and the Reader is a 200K disk file, my code may concurrently Write() on the same TCPConn. I see the result of the Write() inserted into the result of the io.Copy(). I had the impression that was impossible, but I must be mistaken, as the sendfil