})
}
+// Enables uploading data, if it was disabled.
func (t *Torrent) AllowDataUpload() {
t.cl.lock()
defer t.cl.unlock()
}
}
+// Disables uploading data, if it was enabled.
func (t *Torrent) DisallowDataUpload() {
t.cl.lock()
defer t.cl.unlock()
}
}
+// Sets a handler that is called if there's an error writing a chunk to local storage. By default,
+// or if nil, a critical message is logged, and data download is disabled.
func (t *Torrent) SetOnWriteChunkError(f func(error)) {
t.cl.lock()
defer t.cl.unlock()