/** * Write data to the socket. * * @param string $data The data to write to the socket * @return boolean Success */ public function write($data) { if ($data && $this->_transport) { $data = $this->encode($data); } return parent::write($data); }