mirror of https://github.com/ethereum/go-ethereum
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.
15 lines
304 B
15 lines
304 B
package whisper
|
|
|
|
type Message struct {
|
|
Flags byte
|
|
Signature []byte
|
|
Payload []byte
|
|
}
|
|
|
|
func NewMessage(payload []byte) *Message {
|
|
return &Message{Flags: 0, Payload: payload}
|
|
}
|
|
|
|
func (self *Message) Bytes() []byte {
|
|
return append([]byte{self.Flags}, append(self.Signature, self.Payload...)...)
|
|
}
|
|
|