[TASK] Added the reconnect-flag that works now.
This commit is contained in:
@@ -65,6 +65,15 @@ class Socket_SocketHandler {
|
||||
return $this->is_connected;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets is_connected-flag.
|
||||
* @param boolean $connected
|
||||
* @return void
|
||||
*/
|
||||
public function setConnected($connected) {
|
||||
$this->is_connected = $connected;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
@@ -206,6 +215,7 @@ class Socket_SocketHandler {
|
||||
* @throws Exception_SocketException
|
||||
*/
|
||||
protected function error() {
|
||||
if(is_resource($this->socket) === FALSE) throw new Exception_SocketException("No socket resource available!", 1290954177);
|
||||
$errno = socket_last_error($this->socket);
|
||||
$error = socket_strerror($errno);
|
||||
socket_clear_error();
|
||||
|
||||
Reference in New Issue
Block a user