gbxremote nadeo lib update

This commit is contained in:
kremsy 2017-03-12 11:03:58 +01:00
parent 2807d056a5
commit ded6fca6ff

View File

@ -16,8 +16,8 @@ class GbxRemote
public static $sent; public static $sent;
private $socket; private $socket;
private $readTimeout = array('sec' => 30, 'usec' => 0); private $readTimeout = array('sec' => 5, 'usec' => 0);
private $writeTimeout = array('sec' => 30, 'usec' => 0); private $writeTimeout = array('sec' => 5, 'usec' => 0);
private $requestHandle; private $requestHandle;
private $callbacksBuffer = array(); private $callbacksBuffer = array();
private $multicallBuffer = array(); private $multicallBuffer = array();
@ -85,7 +85,7 @@ class GbxRemote
// handshake // handshake
$header = $this->read(15); $header = $this->read(15);
if($header === false) if($header === false)
$this->onIoFailure('during handshake'); $this->onIoFailure(sprintf('during handshake (%s)', socket_strerror(socket_last_error($this->socket))));
extract(unpack('Vsize/a*protocol', $header)); extract(unpack('Vsize/a*protocol', $header));
/** @var $size int */ /** @var $size int */