• Brad Fitzpatrick's avatar
    net: change SetTimeout to SetDeadline · b71883e9
    Brad Fitzpatrick authored
    Previously, a timeout (in int64 nanoseconds) applied to a granularity
    even smaller than one operation:  a 100 byte read with a 1 second timeout
    could take 100 seconds, if the bytes all arrived on the network 1 second
    apart.  This was confusing.
    
    Rather than making the timeout granularity be per-Read/Write,
    this CL makes callers set an absolute deadline (in time.Time)
    after which operations will fail.  This makes it possible to
    set deadlines at higher levels, without knowing exactly how
    many read/write operations will happen in e.g. reading an HTTP
    request.
    
    Fixes #2723
    
    R=r, rsc, dave
    CC=golang-dev
    https://golang.org/cl/5555048
    b71883e9
Name
Last commit
Last update
..
aes Loading commit data...
bcrypt Loading commit data...
blowfish Loading commit data...
cast5 Loading commit data...
cipher Loading commit data...
des Loading commit data...
dsa Loading commit data...
ecdsa Loading commit data...
elliptic Loading commit data...
hmac Loading commit data...
md4 Loading commit data...
md5 Loading commit data...
ocsp Loading commit data...
openpgp Loading commit data...
rand Loading commit data...
rc4 Loading commit data...
ripemd160 Loading commit data...
rsa Loading commit data...
sha1 Loading commit data...
sha256 Loading commit data...
sha512 Loading commit data...
subtle Loading commit data...
tls Loading commit data...
twofish Loading commit data...
x509 Loading commit data...
xtea Loading commit data...
Makefile Loading commit data...
crypto.go Loading commit data...