[TASK] Added the reconnect-flag that works now.

This commit is contained in:
Jan Philipp Timme
2010-11-28 16:38:03 +00:00
parent b318595783
commit a20a91bf12
7 changed files with 166 additions and 8 deletions
+10
View File
@@ -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();