elephant.io
elephant.io copied to clipboard
socket.io 3
Is this compatible with socket.io 3? It seems to connect but my socket server doesn't detect the connection.
Not sure, haven't had a look at socket.io in ages...
As already said, this project is not really maintained anymore, even though PR are still looked at.
this is really important, please, someone take a look at this, I don't have the knowledge to implement the new methods to this library, but, these links will be useful:
- https://socket.io/docs/v3/migrating-from-2-x-to-3-0/index.html
- https://github.com/socketio/engine.io-protocol#difference-between-v3-and-v4
- https://github.com/socketio/socket.io-protocol#difference-between-v5-and-v4
Try create class:
class Version3x extends Version2X {
/** {@inheritDoc} */
public function getName()
{
return 'SocketIO Version 3.X';
}
/** {@inheritDoc} */
protected function getDefaultOptions()
{
$defaults = parent::getDefaultOptions();
$defaults['version'] = 4;
return $defaults;
}
}
then:
$this->client = new Client(new Version3x($this->url, []));
Try my fork https://github.com/tohenk/elephant.io.
@tohenk thank you for all this work! I just try for my personal use, and now Work on my V3.1.0 Socket.IO server!! Amazing. Thank you again
Try my fork https://github.com/tohenk/elephant.io.
OMG i love you guy, your fork really work perfectly with socket io 4 server ? I just want to emit events, its only a question of "version" passed ?
Try my fork https://github.com/tohenk/elephant.io.
Amazing work! It works perfectly!
Try my fork https://github.com/tohenk/elephant.io.
really great work!THX,BRO!!!
Try create class:
class Version3x extends Version2X { /** {@inheritDoc} */ public function getName() { return 'SocketIO Version 3.X'; } /** {@inheritDoc} */ protected function getDefaultOptions() { $defaults = parent::getDefaultOptions(); $defaults['version'] = 4; return $defaults; } }
then:
$this->client = new Client(new Version3x($this->url, []));
Is this working?