PHPDaemon\Network\Connection::write PHP Method

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
    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);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @TODO
  * @param  string $s Data
  */
 public function write($s)
 {
     parent::write($s);
 }