[go-nuts] Re: [golang-dev] does net.Conn.SetDeadLine makes syscall ?

2019-04-06 Thread Dave Cheney
In this case it looks like to be correct you must set the deadline before reading from the network, and given reading from the network can block, the cost of setting the deadline is small. On Sat, 6 Apr 2019 at 21:47, Santhosh T wrote: > > Hi Dave, > > my mistake, bufr is backed by net.Conn > >

[go-nuts] Re: [golang-dev] does net.Conn.SetDeadLine makes syscall ?

2019-04-06 Thread Santhosh T
Hi Dave, I agree with you thanks Santhosh On Sat, Apr 6, 2019 at 4:22 PM Dave Cheney wrote: > In this case it looks like to be correct you must set the deadline > before reading from the network, and given reading from the network > can block, the cost of setting the deadline is small. > > On

[go-nuts] Re: [golang-dev] does net.Conn.SetDeadLine makes syscall ?

2019-04-06 Thread Santhosh T
Hi Dave, my mistake, bufr is backed by net.Conn bufr := bufio.newReader(netConn) for numEntries >0 { numEntries-- netConn.setReadDeadline(timeNow().add(heartbeatTimeout) entry.decode(bufr) process(entry) } thanks Santhosh On Sat, Apr 6, 2019 at 4:09 PM Dave Cheney wrote: >