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