write() public method

Send data to the connection. Note that it just writes to buffer that flushes at every baseloop
public write ( string $data ) : boolean
$data string Data to send
return boolean Success
Esempio n. 1
0
 /**
  * Send data to the connection. Note that it just writes to buffer that flushes at every baseloop
  * @param  string  $data Data to send
  * @return boolean       Success
  */
 public function write($data)
 {
     if ($this->dgram) {
         return $this->parentSocket->sendTo($data, $this->finished ? MSG_EOF : 0, $this->host, $this->port);
     }
     return parent::write($data);
 }