Releases: xgfone/go-bt
Releases · xgfone/go-bt
v0.5.0: Refactor the code
v0.4.3
v0.4.2
v0.4.1
v0.4.0
v0.3.0
- Added:
- Add some common piece size constants, such as 256KB, 512KB, 1M, 2M, 4M.
- Changed:
- When listening on the empty address, that's,
0.0.0.0
or[::]
, the DHT server enables the ipv4/ipv6 protocols by default.
- When listening on the empty address, that's,
- Other:
- Export the fileds of the peer server
peerprotocol.Server
to rewrite the settings.
- Export the fileds of the peer server
v0.2.0
- Added:
- Add the timeout for dialing the remote peer by the peer protocol.
- Add the function
GetPeers
to easily get the peers from the trackers. - Add the block downloading handler
BlockDownloadHandler
to download the piece block. - Add the method
FilePieces
forFile
to calculate the pieces that the file holds. - Add the method
PieceOffset
andGetFileByOffset
to calculate the offset of the piece. - Add the method
PathWithPrefix
forFile
, which is the same asFile.Path
, but containing a prefix path. - Add the new types
FilePiece
andPieceBlock
to represent the information of the piece and the block. - Add the new interfaces
Reader
andWriter
to read the block data from the torrent file or to write the block data into the torrent file. - Add the NOOP implementations for the handler interfaces
Handler
,Bep3Handler
,Bep5Handler
,Bep6Handler
andBep10Handler
. - Add some new fileds for
PeerConn
and update its implementation.
- Changed:
- Add the prefix
MType
for the message type constants. - Update the interfaces
Bep3Handler
andBep10Handler
. - Update the tracker implementation, such as adding
context.Context
to control the timeout. - Use the type
BitField
as the piece indexes to represent which the peer contains. File.Path
returns the file path containing the directory name whenInfo.Name
is a directory.MetaInfo.Magnet
uses the information ofInfo
as the default when the arguments are the empty value.- For the peer server, the configuration
MaxLength
is set by default to 262144, that's 256KB, instead of 0.
- Add the prefix
- Fixed:
- Fix some bugs.