refactor: make protocol message tags a separate type

This commit is contained in:
Matthias Radestock committed 2015-01-20 21:51:18 +00:00
1 parent a1ef2def2b
commit 644697977b
2 files changed
+11 -9

No files matched your search

+10 -8
View File
@@ -5,8 +5,10 @@ const (
ProtocolVersion = 10
)
type ProtocolMsg byte
const (
ProtocolConnectionEstablished = iota
ProtocolConnectionEstablished ProtocolMsg = iota
ProtocolFragmentationReceived
ProtocolStartFragmentationTest
ProtocolNonce
@@ -16,11 +18,11 @@ const (
)
var (
ProtocolConnectionEstablishedByte = []byte{ProtocolConnectionEstablished}
ProtocolFragmentationReceivedByte = []byte{ProtocolFragmentationReceived}
ProtocolStartFragmentationTestByte = []byte{ProtocolStartFragmentationTest}
ProtocolNonceByte = []byte{ProtocolNonce}
ProtocolFetchAllByte = []byte{ProtocolFetchAll}
ProtocolUpdateByte = []byte{ProtocolUpdate}
ProtocolPMTUVerifiedByte = []byte{ProtocolPMTUVerified}
ProtocolConnectionEstablishedByte = []byte{byte(ProtocolConnectionEstablished)}
ProtocolFragmentationReceivedByte = []byte{byte(ProtocolFragmentationReceived)}
ProtocolStartFragmentationTestByte = []byte{byte(ProtocolStartFragmentationTest)}
ProtocolNonceByte = []byte{byte(ProtocolNonce)}
ProtocolFetchAllByte = []byte{byte(ProtocolFetchAll)}
ProtocolUpdateByte = []byte{byte(ProtocolUpdate)}
ProtocolPMTUVerifiedByte = []byte{byte(ProtocolPMTUVerified)}
)