{"action":"created","issue":{"url":"https://api.github.com/repos/RIAEvangelist/node-ipc/issues/88","repository_url":"https://api.github.com/repos/RIAEvangelist/node-ipc","labels_url":"https://api.github.com/repos/RIAEvangelist/node-ipc/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/RIAEvangelist/node-ipc/issues/88/comments","events_url":"https://api.github.com/repos/RIAEvangelist/node-ipc/issues/88/events","html_url":"https://github.com/RIAEvangelist/node-ipc/issues/88","id":178273507,"number":88,"title":"Client fails to connect to Node server(TCP Sockets)","user":{"login":"SunandoSamaddar","id":17934004,"avatar_url":"https://avatars.githubusercontent.com/u/17934004?v=3","gravatar_id":"","url":"https://api.github.com/users/SunandoSamaddar","html_url":"https://github.com/SunandoSamaddar","followers_url":"https://api.github.com/users/SunandoSamaddar/followers","following_url":"https://api.github.com/users/SunandoSamaddar/following{/other_user}","gists_url":"https://api.github.com/users/SunandoSamaddar/gists{/gist_id}","starred_url":"https://api.github.com/users/SunandoSamaddar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SunandoSamaddar/subscriptions","organizations_url":"https://api.github.com/users/SunandoSamaddar/orgs","repos_url":"https://api.github.com/users/SunandoSamaddar/repos","events_url":"https://api.github.com/users/SunandoSamaddar/events{/privacy}","received_events_url":"https://api.github.com/users/SunandoSamaddar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-09-21T07:58:21Z","updated_at":"2016-09-28T20:54:40Z","closed_at":null,"body":"So, I'm trying to pass messages between a node server(which uses both node-ipc and socket.io) and an Electron client.\r\n\r\nNode server `ipc.config` below\r\n```\r\nipc.config = {\r\n\tappspace        : 'app.',\r\n\tsocketRoot      : '/tmp/',\r\n\tid              : 'test',\r\n\tnetworkHost     : 'localhost', //should resolve to 127.0.0.1 or ::1 see the table below related to this\r\n\tnetworkPort     : 9090,\r\n\tencoding        : 'utf8',\r\n\trawBuffer       : false,\r\n\tsync            : false,\r\n\tsilent          : false,\r\n\tlogInColor      : true,\r\n\tlogDepth        : 5,\r\n\tmaxConnections  : 100,\r\n\tretry           : 1500,\r\n\tmaxRetries      : false,\r\n\tstopRetrying    : false\r\n};\r\n```\r\n\r\nServer code below - relevant portion\r\n```\r\nipc.serveNet(\r\n        ipc.config.networkHost,\r\n        ipc.config.networkPort,\r\n\tfunction() {\r\n\t\tio.on('connection', function(socket) {\r\n\t\t\tsocket.on('move', function(data) {\r\n\t\t\t\t//console.log(data);\r\n\t\t\t\tif(data.direction == 'F') {\r\n\t\t\t\t\tipc.server.emit(socket, { type: 'app.move'}, { direction: 'F' });\r\n\t\t\t\t} else if(data.direction == 'L') {\r\n\t\t\t\t\tipc.server.emit(socket, { type: 'app.move'}, { direction: 'L' });\r\n\t\t\t\t} else if(data.direction == 'R') {\r\n\t\t\t\t\tipc.server.emit(socket, { type: 'app.move'}, { direction: 'R' });\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n);\r\nipc.server.start();\r\n```\r\n\r\nElectron client **index.html** inline JavaScript code below. **[I have included `<script type=\"text/javascript\" src=\"node_modules/node-ipc/node-ipc.js\"></script>` before the inline code]**\r\n```\r\nvar ipc = require('node-ipc');\r\n\r\nipc.config = {\r\n\t\t\t\t\tappspace        : 'app.',\r\n\t\t\t\t\tsocketRoot      : '/tmp/',\r\n\t\t\t\t\tid              : 'notTest',\r\n\t\t\t\t\tnetworkHost     : 'localhost', //should resolve to 127.0.0.1 or ::1 see the table below related to this\r\n\t\t\t\t\tnetworkPort     : 9090,\r\n\t\t\t\t\tencoding        : 'utf8',\r\n\t\t\t\t\trawBuffer       : false,\r\n\t\t\t\t\tsync            : false,\r\n\t\t\t\t\tsilent          : false,\r\n\t\t\t\t\tlogInColor      : true,\r\n\t\t\t\t\tlogDepth        : 5,\r\n\t\t\t\t\tmaxConnections  : 100,\r\n\t\t\t\t\tretry           : 1500,\r\n\t\t\t\t\tmaxRetries      : false,\r\n\t\t\t\t\tstopRetrying    : false\r\n };\r\n\r\nipc.connectToNet(\r\n\t\t\t\t\t\t'test',\r\n\t\t\t\t\t\t9090,\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\tipc.of.test.on(\r\n\t\t\t\t\t\t\t\t\t'connect',\r\n\t\t\t\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\t\t\t\tipc.log('## connected to test ##'.rainbow, ipc.config.delay);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\tipc.of.test.on(\r\n\t\t\t\t\t\t\t\t\t'moveIn',\r\n\t\t\t\t\t\t\t\t\tfunction(data) {\r\n\t\t\t\t\t\t\t\t\t\tipc.log('command from node server '.debug, data);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n);\r\n\t\t\t\t\r\n```\r\n\r\nElectron client console throws the error below\r\n```\r\nIPC.js:85 requested connection to  test localhost\r\nIPC.js:85 Connecting client via TCP to localhost 9090\r\nIPC.js:85  \r\nIPC.js:85 retrying reset\r\n```"},"comment":{"url":"https://api.github.com/repos/RIAEvangelist/node-ipc/issues/comments/250296596","html_url":"https://github.com/RIAEvangelist/node-ipc/issues/88#issuecomment-250296596","issue_url":"https://api.github.com/repos/RIAEvangelist/node-ipc/issues/88","id":250296596,"user":{"login":"RIAEvangelist","id":369041,"avatar_url":"https://avatars.githubusercontent.com/u/369041?v=3","gravatar_id":"","url":"https://api.github.com/users/RIAEvangelist","html_url":"https://github.com/RIAEvangelist","followers_url":"https://api.github.com/users/RIAEvangelist/followers","following_url":"https://api.github.com/users/RIAEvangelist/following{/other_user}","gists_url":"https://api.github.com/users/RIAEvangelist/gists{/gist_id}","starred_url":"https://api.github.com/users/RIAEvangelist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIAEvangelist/subscriptions","organizations_url":"https://api.github.com/users/RIAEvangelist/orgs","repos_url":"https://api.github.com/users/RIAEvangelist/repos","events_url":"https://api.github.com/users/RIAEvangelist/events{/privacy}","received_events_url":"https://api.github.com/users/RIAEvangelist/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T20:54:40Z","updated_at":"2016-09-28T20:54:40Z","body":"+1\r\n"}}
{"actor":{"display_login":"RIAEvangelist"}}