MCPcopy Create free account
hub / github.com/tailscale/tailcat / EncodeMeowPing

Function EncodeMeowPing

disco.go:32–39  ·  view source on GitHub ↗

EncodeMeowPing encodes a meow ping packet containing the sender's node public key and disco public key.

(nodeKey key.NodePublic, discoKey key.DiscoPublic)

Source from the content-addressed store, hash-verified

30// EncodeMeowPing encodes a meow ping packet containing the sender's
31// node public key and disco public key.
32func 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.
42func EncodeMeowed() []byte {

Callers 1

pingMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected