by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 13 03:47
    hohvn closed #36
  • Nov 14 2019 16:08
    hohvn commented #29
  • Jun 29 2019 16:27
    oncesk commented #95
  • Jun 28 2019 13:45
    Alva99 commented #95
  • Jun 18 2019 14:17
    Alva99 commented #95
  • Jun 18 2019 14:13
    oncesk commented #95
  • Jun 18 2019 12:51
    Alva99 commented #95
  • Jun 18 2019 12:38
    oncesk commented #95
  • Jun 18 2019 12:25
    Alva99 commented #95
  • Jun 18 2019 07:13
    oncesk commented #95
  • Jun 18 2019 07:09
    oncesk commented #95
  • Jun 17 2019 15:44
    Alva99 commented #95
  • Jun 17 2019 07:18
    oncesk commented #95
  • Jun 17 2019 01:06
    Alva99 opened #95
  • Apr 11 2019 11:18
    oncesk commented #94
  • Apr 11 2019 11:17

    oncesk on master

    Elephant.io URL http or https … Merge pull request #94 from mar… (compare)

  • Apr 11 2019 11:17
    oncesk closed #94
  • Apr 03 2019 07:39
    marcinmisiak opened #94
  • Dec 27 2018 12:36
    oncesk commented #93
  • Dec 27 2018 08:12
    vintprox commented #93
oncesk
@oncesk
you trying to emit authentication message, this message should authenticate user on nodejs server
did you tried send simple event frame?
only start session before
because now nodejs reject your connections because session is not sending
Huy Nguyen Quang
@hnq90
Oh, so I have to open session before emit message?
oncesk
@oncesk
yes
Huy Nguyen Quang
@hnq90
Do you have any solution than open Yii session?
 $session = Yii::$app->session;
        $session->open();
        $frame = Yii::$app->nodeSocket->getFrameFactory()->createEventFrame();
        $frame->setEventName('updateBoard');
        $frame['boardId'] = 25;
        $frame['boardData'] = 'Test';
        $frame->send();
        return $this->render('index');
I have to do like that
oncesk
@oncesk
ok, now open that action and show nodejs logs
session needed for client authorization
for emit messages to concrete user
Huy Nguyen Quang
@hnq90
tail: /var/log/node-socket.log: file truncated
info: socket.io started
Listening frontend.dev:3001
Set origin:  *:*
debug: client authorized
info: handshake authorized tBgrGjMN8aMamNCxYdSX
debug: setting request GET /socket.io/1/websocket/tBgrGjMN8aMamNCxYdSX
debug: set heartbeat interval for client tBgrGjMN8aMamNCxYdSX
debug: client authorized for 
debug: websocket writing 1::
debug: client authorized for /client
debug: websocket writing 1::/client
debug: client authorized
info: handshake authorized m0V0r5W3hlnk10zPYdSY
debug: setting request GET /socket.io/1/websocket/m0V0r5W3hlnk10zPYdSY
debug: set heartbeat interval for client m0V0r5W3hlnk10zPYdSY
debug: client authorized for 
debug: websocket writing 1::
debug: client authorized for /client
debug: websocket writing 1::/client
debug: client authorized
info: handshake authorized K6vDXrgvQ6v1uh3CYdSZ
debug: setting request GET /socket.io/1/websocket/K6vDXrgvQ6v1uh3CYdSZ
debug: set heartbeat interval for client K6vDXrgvQ6v1uh3CYdSZ
debug: client authorized for 
debug: websocket writing 1::
debug: client authorized for /server
debug: websocket writing 1::/server
debug: websocket writing 5::/client:{"name":"global:updateBoard","args":[{"boardId":25,"boardData":"Test"}]}
debug: websocket writing 5::/client:{"name":"global:updateBoard","args":[{"boardId":25,"boardData":"Test"}]}
info: transport end (undefined)
debug: set close timeout for client K6vDXrgvQ6v1uh3CYdSZ
debug: cleared close timeout for client K6vDXrgvQ6v1uh3CYdSZ
debug: cleared heartbeat interval for client K6vDXrgvQ6v1uh3CYdSZ
debug: discarding transport
info: transport end (undefined)
debug: set close timeout for client m0V0r5W3hlnk10zPYdSY
debug: cleared close timeout for client m0V0r5W3hlnk10zPYdSY
debug: cleared heartbeat interval for client m0V0r5W3hlnk10zPYdSY
debug: discarding transport
debug: served static content /socket.io.js
debug: client authorized
info: handshake authorized uy4TUwlM0YedejfmYdSa
debug: setting request GET /socket.io/1/websocket/uy4TUwlM0YedejfmYdSa
debug: set heartbeat interval for client uy4TUwlM0YedejfmYdSa
debug: client authorized for 
debug: websocket writing 1::
debug: client authorized for /client
debug: websocket writing 1::/client
Tying connect socket to room
Room test
Socket connected
debug: sending data ack packet
debug: websocket writing 6::/client:1+[true,1]
That's my new log
oncesk
@oncesk
so, seems like all works fine, now subscribe to updateBoard event in js and you listener will be fired
Huy Nguyen Quang
@hnq90
Yeah, thank you so much.
oncesk
@oncesk
do not at all=)
Huy Nguyen Quang
@hnq90
Could I call session open in Yii callback?
like beforeAction
oncesk
@oncesk
you can, but i do not know how do it more efficient in your application
Huy Nguyen Quang
@hnq90
Okay, thank you for your support.
Elephant.io has version 3.0
But it isn't compatible with your library
oncesk
@oncesk
yes, it is, if you want you can create pull request with new elephant.io version
Huy Nguyen Quang
@hnq90
Yeah, may be in next few days :D
oncesk
@oncesk
ok, and you can implement support for https
i can send to you working code)
Huy Nguyen Quang
@hnq90
Yes
Please send it to me
oncesk
@oncesk
on which email
Doru Popescu
@dorw123
can you emit from console?
zhuyilalala
@zhuyilalala
hello
Alina Papish
@Alinka24789_twitter
hello
I try set up yii-node-socket through https but it not successfully for me.
Can somebody send example for server.js how it must be changing for https server?
I beginner for it. Please, help me.
Doru Popescu
@dorw123
hello
Miracle Interface
@mi_test_purpose_twitter
Hellooo
I have one Question which extension i can used for YII version 1.1.17
Can you post download link for yii-node-socket for YII 1.1.17 not for yii 2
Doru Popescu
@dorw123
hello @oncesk
are you near?
bipin Panday
@siemebipsbro
hello, can you help me with folder structure to implement yii-node-socket
where should i have to create server.js file
bipin Panday
@siemebipsbro
@oncesk please help me hhere to put server.js and client.js file
Rodion Borisov
@vintprox
That's unfortunate that community on Gitter is dead all the time...
I even don't understand what console/config/main.php is. Is it something about commands directory in Yii2?
Rodion Borisov
@vintprox
oh wait, I understand now. that's all because I used basic template
Doru Popescu
@dorw123
hello
phopvitc
@phopvitc
@oncesk Please help me to registerClientScripts
I added this line: Yii::$app->nodeSocket->registerClientScripts();
but i received a error: getConverter()
"Call to a member function getConverter() on string"
from this line:
if (isset($this->basePath, $this->baseUrl) && ($converter = $am->getConverter()) !== null) {