Exemple #1
0
 /**
  * @param string $data
  * @throws IOException
  */
 public function write($data)
 {
     if (null !== $this->encryptor) {
         $data = $this->encryptor->encrypt($data);
     }
     $result = @fputs($this->connection, $data);
     if (false === $result) {
         throw new IOException($this->__toString() . " " . $data);
     }
 }
Exemple #2
0
 protected final function _write($data)
 {
     if (null !== $this->encryptor) {
         $data = $this->encryptor->encrypt($data);
     }
     $result = @fputs($this->connection, $data);
     if (false === $result) {
         throw new \Socket\Exception\IOException($this->toString() . "\n" . $data);
     }
 }