PHPDaemon\WebSocket\Route::__construct PHP Method

__construct() public method

Called when client connected.
public __construct ( Connection $client, AppInstance $appInstance = null )
$client PHPDaemon\Servers\WebSocket\Connection Remote client
$appInstance PHPDaemon\Core\AppInstance
    public function __construct($client, $appInstance = null)
    {
        $this->client = $client;
        $this->attrs = new \stdClass();
        $this->attrs->get =& $client->get;
        $this->attrs->cookie =& $client->cookie;
        $this->attrs->server =& $client->server;
        $this->attrs->session = null;
        if ($appInstance) {
            $this->appInstance = $appInstance;
        }
    }