简单实现peer wire protocol协议

This commit is contained in:
liwei committed 2019-11-01 15:05:25 +08:00
1 parent ae1c605143
commit fb45066228
13 files changed
+859 -404

No files matched your search

+9 -9
View File
@@ -8,15 +8,15 @@ import (
type ID byte
const (
IdChoke ID = 0
IdUnchoke ID = 1
IdInterested ID = 2
IdNotinterested ID = 3
IdHave ID = 4
IdBitfield ID = 5
IdRequest ID = 6
IdPiece ID = 7
IdCancel ID = 8
IdChoke ID = iota
IdUnchoke
IdInterested
IdNotinterested
IdHave
IdBitfield
IdRequest
IdPiece
IdCancel
)
/*type Message struct {