{"action":"closed","issue":{"url":"https://api.github.com/repos/Wisembly/elephant.io/issues/121","repository_url":"https://api.github.com/repos/Wisembly/elephant.io","labels_url":"https://api.github.com/repos/Wisembly/elephant.io/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/Wisembly/elephant.io/issues/121/comments","events_url":"https://api.github.com/repos/Wisembly/elephant.io/issues/121/events","html_url":"https://github.com/Wisembly/elephant.io/issues/121","id":114468863,"number":121,"title":"Use the namespaces ","user":{"login":"yahorosh","id":3594651,"avatar_url":"https://avatars.githubusercontent.com/u/3594651?v=3","gravatar_id":"","url":"https://api.github.com/users/yahorosh","html_url":"https://github.com/yahorosh","followers_url":"https://api.github.com/users/yahorosh/followers","following_url":"https://api.github.com/users/yahorosh/following{/other_user}","gists_url":"https://api.github.com/users/yahorosh/gists{/gist_id}","starred_url":"https://api.github.com/users/yahorosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahorosh/subscriptions","organizations_url":"https://api.github.com/users/yahorosh/orgs","repos_url":"https://api.github.com/users/yahorosh/repos","events_url":"https://api.github.com/users/yahorosh/events{/privacy}","received_events_url":"https://api.github.com/users/yahorosh/received_events","type":"User","site_admin":false},"labels":[{"id":125635692,"url":"https://api.github.com/repos/Wisembly/elephant.io/labels/support","name":"support","color":"c7def8","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2015-11-01T13:11:12Z","updated_at":"2016-11-03T16:51:41Z","closed_at":"2016-11-03T16:51:41Z","body":"I try to add namespace in my node app\n\n``` javascript\nvar gamemaster = io.of('/gamemaster');\n\ngamemaster.on('connection', function( socket ){\n    console.log('a gamemaster connected');\n    socket.on('newgame', function(data, callback){\n        console.log(data);\n        //callback(null, \"OK\");\n        //socket.emit('game:create', {id:21, conn:115, gamers:3, items:34});\n    });   \n});\n```\n\nBrowser javascript client connected i OK.\n\nThen I try to connect with elephant\n\n``` php\n$client = new Client(new Version1X('http://127.0.0.1:3000/gamemaster'));\n        $client->initialize();\n        $client->emit('newgame', ['foo' => 'bar']);\n        while (true) {\n            $r = $client->read();\n            if (!empty($r)) {\n                var_dump($r);\n            }\n        }\n        $client->close();\n```\n\nand get the error\n\n``` bash\nException 'ElephantIO\\Exception\\ServerConnectionFailureException' with message 'An error occurred while trying to establish a connection to the server'\n\nin [cuted]data/source/vendor/wisembly/elephant.io/src/Engine/SocketIO/Version1X.php:144\n```\n"}}
{"actor":{"display_login":"Taluu"}}