Comment on Serialization Format
continuous-integration/drone/push Build is pending Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2022-01-25 15:44:37 -08:00
parent ea9cf5ca87
commit a088e588b1
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ type PeerMessage struct {
}
// Serialize constructs an efficient serialized representation
// Format: [ID String] | [Context String] | Binary Data
func (m *PeerMessage) Serialize() []byte {
return append(append([]byte(m.ID+"|"), []byte(m.Context+"|")...), m.Data...)
}