summaryrefslogtreecommitdiff
path: root/inc/HTTPClient.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2011-01-12 20:55:16 +0100
committerAndreas Gohr <andi@splitbrain.org>2011-01-12 21:00:46 +0100
commitb58bcfed1ea9c70e4103c91723a19c845b06f300 (patch)
treeee34f03965206d35850e3da36a1eea8b5b119901 /inc/HTTPClient.php
parenta6bacf701037fe4798658f00854ec9c5e6ddf835 (diff)
downloadrpg-b58bcfed1ea9c70e4103c91723a19c845b06f300.tar.gz
rpg-b58bcfed1ea9c70e4103c91723a19c845b06f300.tar.bz2
removed setter/getter to match coding style
since we don't use setter/getters for the other options it doesn't make sense to have them for the keep-alive function
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r--inc/HTTPClient.php26
1 files changed, 3 insertions, 23 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index 53b344b76..7e5e40ee3 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -252,7 +252,7 @@ class HTTPClient {
if($uri['port']) $headers['Host'].= ':'.$uri['port'];
$headers['User-Agent'] = $this->agent;
$headers['Referer'] = $this->referer;
- if ($this->isKeepAlive()) {
+ if ($this->keep_alive) {
$headers['Connection'] = 'Keep-Alive';
} else {
$headers['Connection'] = 'Close';
@@ -303,7 +303,7 @@ class HTTPClient {
stream_set_blocking($socket,0);
// keep alive?
- if ($this->isKeepAlive()) {
+ if ($this->keep_alive) {
$this->connections[$connectionId] = $socket;
} else {
unset($this->connections[$connectionId]);
@@ -493,7 +493,7 @@ class HTTPClient {
}
}
- if (!$this->isKeepAlive() ||
+ if (!$this->keep_alive ||
(isset($this->resp_headers['connection']) && $this->resp_headers['connection'] == 'Close')) {
// close socket
$status = socket_get_status($socket);
@@ -646,26 +646,6 @@ class HTTPClient {
}
/**
- * Returns if the keep-alive feature is enabled or not.
- *
- * @return bool keep-alive enabled
- * @author Tobias Sarnowski <sarnowski@new-thoughts.org>
- */
- function isKeepAlive() {
- return $this->keep_alive;
- }
-
- /**
- * Set the keep-alive feature status.
- *
- * @param bool $keep_alive if keep-alive should be enabled or not
- * @author Tobias Sarnowski <sarnowski@new-thoughts.org>
- */
- function setKeepAlive($keep_alive) {
- $this->keep_alive = $keep_alive;
- }
-
- /**
* Generates a unique identifier for a connection.
*
* @return string unique identifier