Add MarshalBencode to the torrent_info_ex, will be used by the Builder.
This commit is contained in:
parent
ae6df86341
commit
b1a6e3eeef
|
@ -160,6 +160,10 @@ func (this *torrent_info_ex) UnmarshalBencode(data []byte) error {
|
|||
return bencode.Unmarshal(data, &this.torrent_info)
|
||||
}
|
||||
|
||||
func (this *torrent_info_ex) MarshalBencode() ([]byte, error) {
|
||||
return bencode.Marshal(&this.torrent_info)
|
||||
}
|
||||
|
||||
type torrent_data struct {
|
||||
Info torrent_info_ex `bencode:"info"`
|
||||
Announce string `bencode:"announce"`
|
||||
|
|
Loading…
Reference in New Issue