feat: add protocol types

This commit is contained in:
Derrick Hammer 2024-01-05 13:47:56 -05:00
parent a5cc5b3d9e
commit 785d4029e9
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 21 additions and 0 deletions

21
types/protocol.go Normal file
View File

@ -0,0 +1,21 @@
package types
type ProtocolMethod int
const (
ProtocolMethodHandshakeOpen ProtocolMethod = 0x1
ProtocolMethodHandshakeDone ProtocolMethod = 0x2
ProtocolMethodSignedMessage ProtocolMethod = 0xA
ProtocolMethodHashQuery ProtocolMethod = 0x4
ProtocolMethodAnnouncePeers ProtocolMethod = 0x8
ProtocolMethodRegistryQuery ProtocolMethod = 0xD
)
var ProtocolMethodMap = map[ProtocolMethod]string{
ProtocolMethodHandshakeOpen: "HandshakeOpen",
ProtocolMethodHandshakeDone: "HandshakeDone",
ProtocolMethodSignedMessage: "SignedMessage",
ProtocolMethodHashQuery: "HashQuery",
ProtocolMethodAnnouncePeers: "AnnouncePeers",
ProtocolMethodRegistryQuery: "RegistryQuery",
}