mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-17 22:03:41 +00:00
Refactor
This commit is contained in:
1 parent
075852b847
commit
adb7d89018
19 files changed
+415
-258
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package message
|
||||
|
||||
// choke: <len=0001><id=0>
|
||||
type Interested struct {
|
||||
Message
|
||||
}
|
||||
|
||||
func NewInterested() *Interested {
|
||||
return &Interested{
|
||||
Message{
|
||||
Length: 1,
|
||||
ID: IdInterested,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Interested) Encode() []byte {
|
||||
return c.Message.Encode()
|
||||
}
|
||||
|
||||
func (c *Interested) Decode(buf []byte) Serialize {
|
||||
c.Message.Decode(buf)
|
||||
return c
|
||||
}
|
||||
Reference in new issue
Block a user