I have a socket error when running the socket_recv inside this function:
function readByteXByteSIBmsg() {
$msg = "";
$buf="";
try {
while( $ret=socket_recv($this->kpSocket,$buf,8192,0)){
$msg.=$buf;
if($ret<8192) break;
}
$this->deb_print("KpCore:readByteXByteSIBmsg:READ LOOP TERMINATED");
} catch (Exception $e) {
err_print("KPICore:readByteXByteSIBmsg:Exception on EVENT HANDLER:RECEIVE:\n" . $e);
$this->$KP_ERROR_ID = $this->ERR_SOCKET_TIMEOUT;
}
return $msg;
}
This is the text of the error:
PHP Warning: socket_recv(): unable to read from socket [11]: Resource temporarily unavailable in /home/luca/Documenti/Tesi/M3 Agent Page/lib/KPICore.php on line 236
(line 236 is the line with the socket_recv call)