Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

handshake is not happening 3.1 #144

Open
shyamjptpm opened this issue Aug 25, 2016 · 8 comments
Open

handshake is not happening 3.1 #144

shyamjptpm opened this issue Aug 25, 2016 · 8 comments

Comments

@shyamjptpm
Copy link

shyamjptpm commented Aug 25, 2016

I am trying to emit an event to socket.io node server from php server but showing error

This server does not support the websocket transport, aborting

when i print the response of handshake i am getting like string(90) "��ÿ0{"sid":"UP7lKpV1wXD8QEhdAAA0","upgrades":[],"pingInterval":20000,"pingTimeout":25000}"
where upgrades[] array is empty.

@Taluu Taluu added the support label Aug 29, 2016
@Taluu
Copy link
Contributor

Taluu commented Aug 29, 2016

I think this is a problem on socket.io node server, not the php side. As it doesn't seem to indicate that websockets are supported, it crashes.

But maybe an improvement could be made, and avoid using websockets if it's not there. But I think if I forced to have websockets, it's for a reason, but I can't quite recall what it was...

Have you set a different value for the transport option ? It should be polling by default, but maybe you tried to handshake directly with websocket ?

@shyamjptpm
Copy link
Author

@Taluu thanks for the reply . Yes i set transport option as websocket instead of polling then it returns false.

@Taluu
Copy link
Contributor

Taluu commented Aug 29, 2016

Would you mind setting it on polling and then check what it does ? thanks

(marking this issue as improvement in order to reflect on whether detecting if websocket is used instead of polling and then not bother to upgrade)

@shyamjptpm
Copy link
Author

@Taluu i set polling. The response showed in my question was the result. My nodejs version is 1.3.5

@Taluu
Copy link
Contributor

Taluu commented Aug 29, 2016

Then this is an issue with you node server, not elephant.io, as it does not return any proper upgrade path. But then again, if no upgrades available, then I don't think we should actually throw an exception.

@phpcs
Copy link

phpcs commented Aug 31, 2016

hao to keepalive with server?

@Taluu
Copy link
Contributor

Taluu commented Aug 31, 2016

This is not the subject of this ticket, and the keepalive is not implemented.

@phpcs
Copy link

phpcs commented Sep 1, 2016

Thanks!
...But I ' want to know hao to keepalive

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants