mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-06 16:40:32 +00:00
25 lines
380 B
Go
25 lines
380 B
Go
package message
|
|
|
|
// choke: <len=0001><id=0>
|
|
type NotInterested struct {
|
|
Message
|
|
}
|
|
|
|
func NewNotInterested() *NotInterested {
|
|
return &NotInterested{
|
|
Message{
|
|
Length: 1,
|
|
ID: IdNotinterested,
|
|
},
|
|
}
|
|
}
|
|
|
|
func (ni *NotInterested) Encode() []byte {
|
|
return ni.Message.Encode()
|
|
}
|
|
|
|
func (ni *NotInterested) Decode(buf []byte) Serialize {
|
|
ni.Message.Decode(buf)
|
|
return ni
|
|
}
|