\r
class MsnManager extends ImManager {\r
public $conn = null;\r
- private $lastping = null;\r
- private $pingInterval;\r
+ protected $lastPing = null;\r
+ protected $pingInterval;\r
\r
/**\r
* Initialise connection to server.\r
* @return void\r
*/\r
public function idle($timeout = 0) {\r
- if (empty($this->lastping) || time() - $this->lastping > $this->pingInterval) {\r
+ if (empty($this->lastPing) || time() - $this->lastPing > $this->pingInterval) {\r
$this->send_ping();\r
}\r
}\r
* Message pump is triggered on socket input, so we only need an idle()\r
* call often enough to trigger our outgoing pings.\r
*/\r
- function timeout() {\r
+ public function timeout() {\r
return $this->pingInterval;\r
}\r
\r
$this->conn->registerHandler('ConnectFailed', array($this, 'handle_connect_failed'));\r
$this->conn->registerHandler('Reconnect', array($this, 'handle_reconnect'));\r
$this->conn->signon();\r
- $this->lastping = time();\r
+ $this->lastPing = time();\r
}\r
return $this->conn;\r
}\r
*\r
* @return void\r
*/\r
- private function send_ping() {\r
+ protected function send_ping() {\r
$this->connect();\r
if (!$this->conn) {\r
return false;\r
}\r
\r
$this->conn->sendPing();\r
- $this->lastping = time();\r
+ $this->lastPing = time();\r
$this->pingInterval = 50;\r
return true;\r
}\r
* @param string $to Intended recipient\r
* @param string $message Message\r
*/\r
- private function enqueue_waiting_message($to, $message) {\r
+ protected function enqueue_waiting_message($to, $message) {\r
$wm = new Msn_waiting_message();\r
\r
$wm->screenname = $to;\r
}\r
\r
// Sending a command updates the time till next ping\r
- $this->lastping = time();\r
+ $this->lastPing = time();\r
$this->pingInterval = 50;\r
return true;\r
}\r