neoneo-go/pkg/network/payload/payloader.go

12 lines
264 B
Go
Raw Normal View History

2018-01-27 15:00:28 +00:00
package payload
import "io"
2018-01-27 15:47:43 +00:00
// Payloader is anything that can be binary encoded and decoded.
// Every payload used in messages need to satisfy the Payloader interface.
2018-01-27 15:00:28 +00:00
type Payloader interface {
Encode(io.Writer) error
Decode(io.Reader) error
Size() uint32
}