Skip to content

Undefined offset: 3 #92

Description

@GerarPacheco

Hello
I am trying to use your extension in Yii 1.19 and it does not work for me, it gives me the following error

Undefined offset: 3

I send you the used code fragments

config / console.php

return array(
'basePath'=>dirname(FILE).DIRECTORY_SEPARATOR.'..',
'name'=>'My Console Application',
'commandMap' => array(
'node-socket' => 'application.extensions.yii-node-socket.lib.php.NodeSocketCommand'
),
// preloading 'log' component
'preload'=>array('log','nodeSocket'),

// application components
'components'=>array(
	'db'=>array(
		'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
	),
	'nodeSocket' => array(
		'class' => 'application.extensions.yii-node-socket.lib.php.NodeSocket',
		'host' => '192.168.101.161',	// default is 127.0.0.1, can be ip or domain name, without http
		'port' => 50000,	// default is 3001, should be integer
		'allowedServerAddresses'=>array('127.0.0.1')
	),

config / main.php
'components' => array(
'nodeSocket' => array(
'class' => 'application.extensions.yii-node-socket.lib.php.NodeSocket',
'host' => '192.168.101.161', // default is 127.0.0.1, can be ip or domain name, without http
'port' => 50000,
),

SiteController /index
public function actionIndex() {
$frame = Yii::app()->nodeSocket->getFrameFactory()->createEventFrame();
$frame->setEventName('broadcast');
$frame->setRoom('test');
$frame['testsss'] = 12;

What could be happening?
Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions