Files
gopeed/protocol/bt/peer/message/msg_unchoke.go
T
2020-02-25 14:22:17 +08:00

25 lines
336 B
Go

package message
// unchoke: <len=0001><id=1>
type Unchoke struct {
Message
}
func NewUnchoke() *Unchoke {
return &Unchoke{
Message{
Length: 1,
ID: IdUnchoke,
},
}
}
func (u *Unchoke) Encode() []byte {
return u.Message.Encode()
}
func (u *Unchoke) Decode(buf []byte) Serialize {
u.Message.Decode(buf)
return u
}