The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/p2p/stream.go

13 lines
300 B

package p2p
import "time"
//go:generate mockgen -source stream.go -package p2p -destination=mock_stream.go
// Stream is abstract p2p stream from where we read message
type Stream interface {
Read([]byte) (int, error)
Write([]byte) (int, error)
Close() error
SetReadDeadline(time.Time) error
}