增加一个直接从Client返回ClientImpl的函数,用于读取MemoryClientImpl实际写入内存的字节数

This commit is contained in:
whr819987540 2023-05-04 17:24:58 +08:00
parent c4fcfe712c
commit 16ce9dc617
1 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,10 @@ func NewClient(cl ClientImpl) *Client {
return &Client{cl}
}
func (cl Client)Ci()ClientImpl{
return cl.ci
}
func (cl Client) OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (*Torrent, error) {
t, err := cl.ci.OpenTorrent(info, infoHash)
if err != nil {