Wisembly/elephant.io — pull request #76 by JanisGruzis (2014-10-03 11:53:57+00:00)
Title: Socket.IO 1.x namespaces

I implemented for Socket.IO 1.x namespaces in Elephant.IO. They are tested in production and do their job. Also i added small example for usage under example/socket.io/1.x/emitter_namespace . Its still possible to use Elephant.IO with default namespace and should be compatible with previous versions. The usage is simple - controller has 3. parameter the namespace. If there is interest in this functionality i could also provide similar solution for Socket.IO 0.x version.

$client = new Client(new Version1X('http://localhost:1337', '/test'));

$client->initialize();
$client->emit('broadcast', ['foo' => 'bar']);
$client->close();

3. parameter is optional.

// Namespace resolves to default one - "/" .
$client = new Client(new Version1X('http://localhost:1337'));

$client->initialize();
$client->emit('broadcast', ['foo' => 'bar']);
$client->close();