Assembla home | Assembla project page
 

root/trunk/Phergie/Plugin/Pong.php

Revision 217, 0.7 kB (checked in by Slynderdale, 5 months ago)

Some final clean up.

Line 
1 <?php
2
3 /**
4  * Responds to tests from the server to ensure the client connection is still
5  * active.
6  */
7 class Phergie_Plugin_Pong extends Phergie_Plugin_Abstract_Base
8 {
9     /**
10      * Determines if the plugin is a passive plugin or not
11      *
12      * @var bool
13      */
14     public $passive = true;
15
16     /**
17      * Responds to PING requests from the server to indicate that the client
18      * connection is still active.
19      *
20      * @return void
21      */
22     public function onPing()
23     {
24         // Check for a handshake hash, otherwise its a server ping request
25         if (!$this->event->getArgument(1)) {
26             $this->doPong($this->event->getArgument(0));
27         }
28     }
29 }
30
Note: See TracBrowser for help on using the browser.