src/PTel.php
public function waitReply($timeout = 10) {
        $timestart = time();
        while (true) {
            $char = $this->recvChr();
            $timerun = time() - $timestart;
            if ($timerun >= $timeout) {
                return false;
            }
            if(!empty($char)) {
                return true;
            }
        }
        return false;
    }
public function waitReply($timeout = 10) {
        $timestart = time();
        while (true) {
            $char = $this->recvChr();
            $timerun = time() - $timestart;
            if ($timerun >= $timeout) {
                return false;
            }
            if(!empty($char)) {
                return true;
            }
        }
        return false;
    }
public function waitReply ( $ timeout = 10 ) { $ timestart = time ( ) ; while ( true ) { $ char = $ this -> recvChr ( ) ; $ timerun = time ( ) - $ timestart ; if ( $ timerun >= $ timeout ) { return false ; } if ( ! empty ( $ char ) ) { return true ; } } return false ; }
Wait for reply from socket

@param int $timeout  Max timeout to wait reply

@throws SocketClientException    On socket communication error
@return bool     True if found reply, false if timeout reached
Wait for reply from socket