public function write($buf, $len = null)
    {
        if (!$this->write_) {
            return $this->transport_->write($buf, $len);
        }

        if ($len !== null && $len < TStringFuncFactory::create()->strlen($buf)) {
            $buf = TStringFuncFactory::create()->substr($buf, 0, $len);
        }
        $this->wBuf_ .= $buf;
    }