This repository was archived by the owner on Aug 25, 2022. It is now read-only.

Description
Hello sorry i know this will be a basic answer but i've been digging around online for hours and can't find anything to solve it.
I'm getting the follow error:
[17-May-2021 12:21:39 UTC] PHP Fatal error: Uncaught ElephantIO\Exception\ServerConnectionFailureException: An error occurred while trying to establish a connection to the server in /Users/#/html/sockets/vendor/wisembly/elephant.io/src/Engine/SocketIO/Version1X.php:187
Stack trace:
#0 /Users/#/html/sockets/vendor/wisembly/elephant.io/src/Engine/SocketIO/Version1X.php(48): ElephantIO\Engine\SocketIO\Version1X->handshake()
#1 /Users/#/html/sockets/vendor/wisembly/elephant.io/src/Client.php(60): ElephantIO\Engine\SocketIO\Version1X->connect()
#2 /Users/#/html/sockets/emit.php(12): ElephantIO\Client->initialize()
#3 {main}
thrown in /Users/#/html/sockets/vendor/wisembly/elephant.io/src/Engine/SocketIO/Version1X.php on line 187
(filepath removed for privacy)
I did search through existing issues and found something similar at the URL below but it didn't - to me atleast - provide a solution.
#179
the code im using to initialize is as follows:
include ("vendor/autoload.php");
use ElephantIO\Client;
use ElephantIO\Engine\SocketIO\Version2X;
$version = new Version2X("http://localhost:3001");
$client = new Client($version);
$client->initialize();
$client->emit("new_order", ["test"=>"test","test1"=>"test1"]);
$client->close();
Any help would be incredibly appreciated.
All the best,
Coinstacker Team