29 lines
452 B
Go
29 lines
452 B
Go
package router
|
|
|
|
const (
|
|
Protocol = "weave"
|
|
ProtocolVersion = 18
|
|
)
|
|
|
|
type ProtocolTag byte
|
|
|
|
const (
|
|
ProtocolHeartbeat ProtocolTag = iota
|
|
ProtocolConnectionEstablished
|
|
ProtocolFragmentationReceived
|
|
ProtocolStartFragmentationTest
|
|
ProtocolPMTUVerified
|
|
ProtocolGossip
|
|
ProtocolGossipUnicast
|
|
ProtocolGossipBroadcast
|
|
)
|
|
|
|
type ProtocolMsg struct {
|
|
tag ProtocolTag
|
|
msg []byte
|
|
}
|
|
|
|
type ProtocolSender interface {
|
|
SendProtocolMsg(m ProtocolMsg)
|
|
}
|