These are chat archives for oncesk/yii-node-socket

3rd
Nov 2015
Huy Nguyen Quang
@hnq90
Nov 03 2015 09:26
Hello
Is there anyone here?
Huy Nguyen Quang
@hnq90
Nov 03 2015 09:45
@oncesk Thanks for fast reply
Could we have a talk in here?
oncesk
@oncesk
Nov 03 2015 10:33
hi
yes
Huy Nguyen Quang
@hnq90
Nov 03 2015 10:35
Hello
Huy Nguyen Quang
@hnq90
Nov 03 2015 10:40
I found that Behavior feature have not supported Yii 2 yet?
oncesk
@oncesk
Nov 03 2015 10:44
fixtures and models did not refactored
now i am not using yii)
Huy Nguyen Quang
@hnq90
Nov 03 2015 10:45
Oh, I still couldn't send event to socket.io from php
Like this
$event = Yii::app()->nodeSocket->getFrameFactory()->createUserEventFrame();
$event->setEventName('message');
$event['text'] = 'Hello, how are you?';
$event->send();
oncesk
@oncesk
Nov 03 2015 10:46
is curl already installed?
do you have errors?
what in nodejs logs
is that user authenticated?
Huy Nguyen Quang
@hnq90
Nov 03 2015 10:49
Oh, I didn't call setUserId function because I want to send this message global
There's no log of that event in nodejs log
oncesk
@oncesk
Nov 03 2015 10:56
is this code works?
Huy Nguyen Quang
@hnq90
Nov 03 2015 10:57
Oh, it didn't work
 public function actionIndex()
    {
        $event = Yii::$app->nodeSocket->getFrameFactory()->createUserEventFrame();
        $event->setEventName('message');
        $event['text'] = 'Hello, how are you?';
        $event->send();
        return $this->render('index');
    }
This is my example code
When I go to that action, nothing happened
oncesk
@oncesk
Nov 03 2015 10:59
do you have 2 tabs in browser one for listen events, second for send, or you do it with one action?
Huy Nguyen Quang
@hnq90
Nov 03 2015 10:59
I can emit and get message from javascript
example: socket.emit and socket.on...
oncesk
@oncesk
Nov 03 2015 11:06
нуы
yes
@hnq90 so, i am not understand your problem))
Huy Nguyen Quang
@hnq90
Nov 03 2015 11:10
Okay, I will try it again.