返回某个torrent实际写入内存的字节数
This commit is contained in:
parent
30e909f905
commit
90b694c4ae
|
@ -2568,3 +2568,11 @@ func (t *Torrent) checkValidReceiveChunk(r Request) error {
|
|||
// catch most of the overflow manipulation stuff by checking index and begin above.
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *Torrent) BytesWrittenToMemory() int64 {
|
||||
ci := t.storageOpener.Ci()
|
||||
if value, ok := ci.(storage.MemoryClientImpl); ok {
|
||||
return value.BytesWrittenToMemory()
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue