code: public function write($message)
      {
          if ($this->isError() || ! $this->isOpen()) {
              return false;
          }
          $count = fwrite($this->handle, $message);
          if (! $count) {
              if ($count === false) {
                  $this->setError('Cannot write to socket');
                  $this->close();
              }
  
              return false;
          }
          fflush($this->handle);
          $this->sent .= $message;
  
          return true;
      }
docs: Writes some data to the socket and saves alocal copy.
  
  @param string $message       String to send to socket.
  
  @return bool              True if successful.