Re: [go-nuts] Re: How can stop a Read of net.Conn without closing it

2020-05-11 Thread Andrei Tudor Călin
That would work, yes. net/http, for example, has var aLongTimeAgo = time.Unix(1, 0), which is used for cancellation. On Mon, May 11, 2020 at 4:47 AM wrote: > > > On Wednesday, June 5, 2019 at 10:14:22 AM UTC-4, Ian Lance Taylor wrote: >> >> On Wed, Jun 5, 2019 at 12:10 AM Kurtis Rader >> wrote:

Re: [go-nuts] Re: How can stop a Read of net.Conn without closing it

2020-05-10 Thread hanisch
On Wednesday, June 5, 2019 at 10:14:22 AM UTC-4, Ian Lance Taylor wrote: > > On Wed, Jun 5, 2019 at 12:10 AM Kurtis Rader > wrote: > > > > On Tue, Jun 4, 2019 at 11:53 PM Inada Naoki > wrote: > >> > >> conn.SetReadDeadline(time.Now()) > > > > > > Did you test that solution? Setting a dea

Re: [go-nuts] Re: How can stop a Read of net.Conn without closing it

2019-06-05 Thread Ian Lance Taylor
On Wed, Jun 5, 2019 at 12:10 AM Kurtis Rader wrote: > > On Tue, Jun 4, 2019 at 11:53 PM Inada Naoki wrote: >> >> conn.SetReadDeadline(time.Now()) > > > Did you test that solution? Setting a deadline only affects "future Read > calls" according to the documentation. It cannot be used to timeout a

Re: [go-nuts] Re: How can stop a Read of net.Conn without closing it

2019-06-05 Thread Kurtis Rader
On Tue, Jun 4, 2019 at 11:53 PM Inada Naoki wrote: > conn.SetReadDeadline(time.Now()) > Did you test that solution? Setting a deadline only affects "future Read calls" according to the documentation. It cannot be used to timeout an extant read. Which is what I would expect given the available UN

[go-nuts] Re: How can stop a Read of net.Conn without closing it

2019-06-04 Thread Inada Naoki
conn.SetReadDeadline(time.Now()) -- 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 visi