1. 12 5月, 2015 1 次提交
    • net/p2p + secio: parallelize crypto handshake · b84fa2b4
      We had a very nasty problem: handshakes were serial so incoming
      dials would wait for each other to finish handshaking. this was
      particularly problematic when handshakes hung-- nodes would not
      recover quickly. This led to gateways not bootstrapping peers
      fast enough.
      
      The approach taken here is to do what crypto/tls does:
      defer the handshake until Read/Write[1]. There are a number of
      reasons why this is _the right thing to do_:
      - it delays handshaking until it is known to be necessary (doing io)
      - it "accepts" before the handshake, getting the handshake out of the
        critical path entirely.
      - it defers to the user's parallelization of conn handling. users
        must implement this in some way already so use that, instead of
        picking constants surely to be wrong (how many handshakes to run
        in parallel?)
      
      [0] http://golang.org/src/crypto/tls/conn.go#L886
      Juan Batiz-Benet 提交于
  2. 11 5月, 2015 1 次提交
  3. 10 5月, 2015 5 次提交
  4. 09 5月, 2015 6 次提交
  5. 08 5月, 2015 6 次提交
  6. 07 5月, 2015 4 次提交
  7. 06 5月, 2015 8 次提交
  8. 05 5月, 2015 5 次提交
  9. 04 5月, 2015 3 次提交
  10. 03 5月, 2015 1 次提交