aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/rlpx.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-03-04 23:27:37 +0800
committerFelix Lange <fjl@twurst.com>2015-03-04 23:42:00 +0800
commit22659a7feaf4e939a33762c3f83b43d8bec757db (patch)
tree59ae2809af292a79a4f619042ed190b4708d5c2a /p2p/rlpx.go
parent6e7e5d5fd56a9a6f73e51239ed6648d76db9650d (diff)
downloaddexon-22659a7feaf4e939a33762c3f83b43d8bec757db.tar
dexon-22659a7feaf4e939a33762c3f83b43d8bec757db.tar.gz
dexon-22659a7feaf4e939a33762c3f83b43d8bec757db.tar.bz2
dexon-22659a7feaf4e939a33762c3f83b43d8bec757db.tar.lz
dexon-22659a7feaf4e939a33762c3f83b43d8bec757db.tar.xz
dexon-22659a7feaf4e939a33762c3f83b43d8bec757db.tar.zst
dexon-22659a7feaf4e939a33762c3f83b43d8bec757db.zip
p2p: restore read/write timeouts
They got lost in the transition to rlpxFrameRW.
Diffstat (limited to 'p2p/rlpx.go')
-rw-r--r--p2p/rlpx.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/p2p/rlpx.go b/p2p/rlpx.go
index a041bb314..166bbb5e6 100644
--- a/p2p/rlpx.go
+++ b/p2p/rlpx.go
@@ -21,6 +21,11 @@ var (
zero16 = make([]byte, 16)
)
+// rlpxFrameRW implements a simplified version of RLPx framing.
+// chunked messages are not supported and all headers are equal to
+// zeroHeader.
+//
+// rlpxFrameRW is not safe for concurrent use from multiple goroutines.
type rlpxFrameRW struct {
conn io.ReadWriter
enc cipher.Stream