protected function onJobCompleted(string $result) : bool
    {
        $this->replySocket->send(json_encode([
            'request' => 'job_completed',
            'worker_id' => $this->workerId,
            'job_id' => $this->jobId,
            'result' => $result
        ]));
        $response = $this->replySocket->recv();
        $this->jobId = null;
        return ($response === 'ok');
    }
protected function onJobCompleted(string $result) : bool
    {
        $this->replySocket->send(json_encode([
            'request' => 'job_completed',
            'worker_id' => $this->workerId,
            'job_id' => $this->jobId,
            'result' => $result
        ]));
        $response = $this->replySocket->recv();
        $this->jobId = null;
        return ($response === 'ok');
    }
protected function onJobCompleted ( string $ result ) : bool { $ this -> replySocket -> send ( json_encode ( [ 'request' => 'job_completed' , 'worker_id' => $ this -> workerId , 'job_id' => $ this -> jobId , 'result' => $ result ] ) ) ; $ response = $ this -> replySocket -> recv ( ) ; $ this -> jobId = null ; return ( $ response === 'ok' ) ; }
Sends results of a job back to server.

@param string $result
@return bool
Sends results of a job back to server .