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 <reng...@ix.netcom.com> wrote:
> 
> use conn SetReadDeadline()
> 
>> On Sep 30, 2018, at 8:41 PM, Dan Kortschak <dan.kortsc...@adelaide.edu.au> 
>> 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_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout));
>> ```
>> 
>> Short of messing around with the fd and using syscall.SetsockoptTimeval
>> (or unix.SetsockoptTimeval) which seems like overkill, is there a
>> sensible way to do this or is it omitted because it is not a useful
>> thing to do?
>> 
>> thanks
>> Dan
>> 
>> -- 
>> 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.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to