mirror of
https://github.com/LBRYFoundation/tracker.git
synced 2025-08-29 08:21:26 +00:00
udp: make the options constant
This commit is contained in:
parent
6fe1ddf1bc
commit
7e1214cf12
1 changed files with 8 additions and 6 deletions
|
@ -22,6 +22,14 @@ const (
|
||||||
announceDualStackActionID
|
announceDualStackActionID
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Option-Types described in BEP41 and BEP45.
|
||||||
|
const (
|
||||||
|
optionEndOfOptions byte = 0x0
|
||||||
|
optionNOP = 0x1
|
||||||
|
optionURLData = 0x2
|
||||||
|
optionIPv6 = 0x3
|
||||||
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// initialConnectionID is the magic initial connection ID specified by BEP 15.
|
// initialConnectionID is the magic initial connection ID specified by BEP 15.
|
||||||
initialConnectionID = []byte{0, 0, 0x04, 0x17, 0x27, 0x10, 0x19, 0x80}
|
initialConnectionID = []byte{0, 0, 0x04, 0x17, 0x27, 0x10, 0x19, 0x80}
|
||||||
|
@ -30,12 +38,6 @@ var (
|
||||||
emptyIPv4 = []byte{0, 0, 0, 0}
|
emptyIPv4 = []byte{0, 0, 0, 0}
|
||||||
emptyIPv6 = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
emptyIPv6 = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
|
|
||||||
// Option-Types described in BEP41 and BEP45.
|
|
||||||
optionEndOfOptions = byte(0x0)
|
|
||||||
optionNOP = byte(0x1)
|
|
||||||
optionURLData = byte(0x2)
|
|
||||||
optionIPv6 = byte(0x3)
|
|
||||||
|
|
||||||
// eventIDs map IDs to event names.
|
// eventIDs map IDs to event names.
|
||||||
eventIDs = []string{
|
eventIDs = []string{
|
||||||
"",
|
"",
|
||||||
|
|
Loading…
Add table
Reference in a new issue