bytesWritten; } public function getBytesRead(): int { return $this->bytesRead; } public function resetBytesWritten(): void { $this->bytesWritten = 0; } public function resetBytesRead(): void { $this->bytesRead = 0; } protected function onWrite(int $bytes_written): void { $this->bytesWritten += $bytes_written; } protected function onRead(int $bytes_read): void { $this->bytesRead += $bytes_read; } }