document that msgBytes in p2p/connection change

This commit is contained in:
Anton Kaliaev
2018-02-08 13:09:46 +04:00
parent d6d1f8512d
commit 3f9aa8d8fa
2 changed files with 6 additions and 7 deletions

View File

@@ -23,7 +23,10 @@ type Reactor interface {
// Receive is called when msgBytes is received from peer.
//
// CONTRACT: msgBytes are not nil
// NOTE reactor can not keep msgBytes around after Receive completes without
// copying.
//
// CONTRACT: msgBytes are not nil.
Receive(chID byte, peer Peer, msgBytes []byte)
}