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;
    }
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;
    }
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 ; }
Send data and appending \n to connection. Note that it just writes to buffer flushed at every baseloop
@param  string Data to send
@return boolean Success
Send data and appending \ n to connection . Note that it just writes to buffer flushed at every baseloop