PHPDaemon\Core\ShellCommand::writeln PHP Method

writeln() public method

Send data and appending \n to connection. Note that it just writes to buffer flushed at every baseloop
public writeln ( $data ) : boolean
return boolean Success
    public function writeln($data)
    {
        if (!$this->alive) {
            Daemon::log('Attempt to write to dead IOStream (' . get_class($this) . ')');
            return false;
        }
        if (!isset($this->bevWrite)) {
            return false;
        }
        if (!mb_orig_strlen($data) && !mb_orig_strlen($this->EOL)) {
            return true;
        }
        $this->writing = true;
        $this->bevWrite->write($data);
        $this->bevWrite->write($this->EOL);
        return true;
    }