Re: [go-nuts] net.TCPConn equivalent for setsockopt

2018-10-01 Thread robert engels
Great, maybe I can find some time and contribute back… I think it would go a long way towards working with complex hierarchy systems easier. > On Oct 1, 2018, at 11:36 PM, Agniva De Sarker > wrote: > > > > On Tuesday, 2 October 2018 04:30:54 UTC+5:30, Robert Engels wrote: > >> On Oct 1, 201

Re: [go-nuts] net.TCPConn equivalent for setsockopt

2018-10-01 Thread Agniva De Sarker
On Tuesday, 2 October 2018 04:30:54 UTC+5:30, Robert Engels wrote: > > > On Oct 1, 2018, at 4:59 PM, Ian Lance Taylor > wrote: > > On Mon, Oct 1, 2018 at 1:53 PM, robert engels > wrote: > > > If you go to the TCPConn SetReadDeadline function, it states “implements > the Conn SetReadDeadline me

Re: [go-nuts] net.TCPConn equivalent for setsockopt

2018-10-01 Thread robert engels
I’v been thinking about what I said below, and I think it is a real problem. It might not affect a lot of people because it only comes into play with complex object hierarchies and multiple implementations - but this is exactly what networking layers/libraries are. Without “implements” the docu

Re: [go-nuts] net.TCPConn equivalent for setsockopt

2018-10-01 Thread robert engels
> On Oct 1, 2018, at 4:59 PM, Ian Lance Taylor wrote: > > On Mon, Oct 1, 2018 at 1:53 PM, robert engels wrote: >> >> If you go to the TCPConn SetReadDeadline function, it states “implements the >> Conn SetReadDeadline method”, with no way of referencing the documentation >> for Conn.SetReadD

Re: [go-nuts] net.TCPConn equivalent for setsockopt

2018-10-01 Thread Dan Kortschak
Thanks, Ian. Yes, I think that is doable. Dan On Mon, 2018-10-01 at 12:01 -0700, Ian Lance Taylor wrote: > On Sun, Sep 30, 2018 at 6:41 PM, Dan Kortschak > wrote: > > > > > > I have been translating some C socket networking code (not my main > > area > > of expertise) and there is something

Re: [go-nuts] net.TCPConn equivalent for setsockopt

2018-10-01 Thread Ian Lance Taylor
On Mon, Oct 1, 2018 at 1:53 PM, robert engels wrote: > > If you go to the TCPConn SetReadDeadline function, it states “implements the > Conn SetReadDeadline method”, with no way of referencing the documentation > for Conn.SetReadDeadline, in fact, no way of even getting to the Conn > interface…

Re: [go-nuts] net.TCPConn equivalent for setsockopt

2018-10-01 Thread robert engels
That brings up a problem I have with the way godoc is generated/provided. If you go to the TCPConn SetReadDeadline function, it states “implements the Conn SetReadDeadline method”, with no way of referencing the documentation for Conn.SetReadDeadline, in fact, no way of even getting to the Conn

Re: [go-nuts] net.TCPConn equivalent for setsockopt

2018-10-01 Thread Ian Lance Taylor
On Sun, Sep 30, 2018 at 6:41 PM, Dan Kortschak wrote: > > I have been translating some C socket networking code (not my main area > of expertise) and there is something that I don't see a way to do with > net.TCPConn. > > The original code sets a revc timeout using > > ``` > setsockopt(fd, SOL_SOC

Re: [go-nuts] net.TCPConn equivalent for setsockopt

2018-09-30 Thread Dan Kortschak
Yeah, I looked at that. It doesn't look like a good solution. On Sun, 2018-09-30 at 21:03 -0500, robert engels wrote: > use conn SetReadDeadline() > > > > > On Sep 30, 2018, at 8:41 PM, Dan Kortschak > edu.au> wrote: > > > > I have been translating some C socket networking code (not my main >

Re: [go-nuts] net.TCPConn equivalent for setsockopt

2018-09-30 Thread robert engels
This may help https://blog.cloudflare.com/the-complete-guide-to-golang-net-http-timeouts/ > On Sep 30, 2018, at 9:04 PM, robert engels wrote: > > But you need to set it on every call because it is an absolute time. > >> On Sep 30, 2018, at 9:03 PM, robert engels wrote: >> >> use conn SetRead

Re: [go-nuts] net.TCPConn equivalent for setsockopt

2018-09-30 Thread robert engels
But you need to set it on every call because it is an absolute time. > On Sep 30, 2018, at 9:03 PM, robert engels wrote: > > use conn SetReadDeadline() > >> On Sep 30, 2018, at 8:41 PM, Dan Kortschak >> wrote: >> >> I have been translating some C socket networking code (not my main area >> o

Re: [go-nuts] net.TCPConn equivalent for setsockopt

2018-09-30 Thread robert engels
use conn SetReadDeadline() > On Sep 30, 2018, at 8:41 PM, Dan Kortschak > wrote: > > I have been translating some C socket networking code (not my main area > of expertise) and there is something that I don't see a way to do with > net.TCPConn. > > The original code sets a revc timeout using >

[go-nuts] net.TCPConn equivalent for setsockopt

2018-09-30 Thread Dan Kortschak
I have been translating some C socket networking code (not my main area of expertise) and there is something that I don't see a way to do with net.TCPConn. The original code sets a revc timeout using ``` setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)); ``` Short of messing aro