EncodeMeowPing encodes a meow ping packet containing the sender's node public key and disco public key.
(nodeKey key.NodePublic, discoKey key.DiscoPublic)
| 30 | // EncodeMeowPing encodes a meow ping packet containing the sender's |
| 31 | // node public key and disco public key. |
| 32 | func EncodeMeowPing(nodeKey key.NodePublic, discoKey key.DiscoPublic) []byte { |
| 33 | b := make([]byte, 0, 4+1+key.NodePublicRawLen+key.DiscoPublicRawLen) |
| 34 | b = append(b, meowMagic[:]...) |
| 35 | b = append(b, meowTypePing) |
| 36 | b = nodeKey.AppendTo(b) |
| 37 | b = discoKey.AppendTo(b) |
| 38 | return b |
| 39 | } |
| 40 | |
| 41 | // EncodeMeowed encodes a meowed (acknowledgment) packet. |
| 42 | func EncodeMeowed() []byte { |