{"action":"created","issue":{"url":"https://api.github.com/repos/firebug/websocket-monitor/issues/18","labels_url":"https://api.github.com/repos/firebug/websocket-monitor/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/firebug/websocket-monitor/issues/18/comments","events_url":"https://api.github.com/repos/firebug/websocket-monitor/issues/18/events","html_url":"https://github.com/firebug/websocket-monitor/issues/18","id":111383740,"number":18,"title":"Support for SockJS","user":{"login":"janodvarko","id":37785,"avatar_url":"https://avatars.githubusercontent.com/u/37785?v=3","gravatar_id":"","url":"https://api.github.com/users/janodvarko","html_url":"https://github.com/janodvarko","followers_url":"https://api.github.com/users/janodvarko/followers","following_url":"https://api.github.com/users/janodvarko/following{/other_user}","gists_url":"https://api.github.com/users/janodvarko/gists{/gist_id}","starred_url":"https://api.github.com/users/janodvarko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janodvarko/subscriptions","organizations_url":"https://api.github.com/users/janodvarko/orgs","repos_url":"https://api.github.com/users/janodvarko/repos","events_url":"https://api.github.com/users/janodvarko/events{/privacy}","received_events_url":"https://api.github.com/users/janodvarko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"fflorent","id":371705,"avatar_url":"https://avatars.githubusercontent.com/u/371705?v=3","gravatar_id":"","url":"https://api.github.com/users/fflorent","html_url":"https://github.com/fflorent","followers_url":"https://api.github.com/users/fflorent/followers","following_url":"https://api.github.com/users/fflorent/following{/other_user}","gists_url":"https://api.github.com/users/fflorent/gists{/gist_id}","starred_url":"https://api.github.com/users/fflorent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fflorent/subscriptions","organizations_url":"https://api.github.com/users/fflorent/orgs","repos_url":"https://api.github.com/users/fflorent/repos","events_url":"https://api.github.com/users/fflorent/events{/privacy}","received_events_url":"https://api.github.com/users/fflorent/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-10-14T12:04:22Z","updated_at":"2015-10-17T16:53:23Z","closed_at":null,"body":"We could have a support for SockJS protocol\r\nhttps://github.com/sockjs\r\n\r\nHonza"},"comment":{"url":"https://api.github.com/repos/firebug/websocket-monitor/issues/comments/148933801","html_url":"https://github.com/firebug/websocket-monitor/issues/18#issuecomment-148933801","issue_url":"https://api.github.com/repos/firebug/websocket-monitor/issues/18","id":148933801,"user":{"login":"fflorent","id":371705,"avatar_url":"https://avatars.githubusercontent.com/u/371705?v=3","gravatar_id":"","url":"https://api.github.com/users/fflorent","html_url":"https://github.com/fflorent","followers_url":"https://api.github.com/users/fflorent/followers","following_url":"https://api.github.com/users/fflorent/following{/other_user}","gists_url":"https://api.github.com/users/fflorent/gists{/gist_id}","starred_url":"https://api.github.com/users/fflorent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fflorent/subscriptions","organizations_url":"https://api.github.com/users/fflorent/orgs","repos_url":"https://api.github.com/users/fflorent/repos","events_url":"https://api.github.com/users/fflorent/events{/privacy}","received_events_url":"https://api.github.com/users/fflorent/received_events","type":"User","site_admin":false},"created_at":"2015-10-17T16:53:23Z","updated_at":"2015-10-17T16:53:23Z","body":"@janodvarko What do you think?\r\n\r\nIf you want to test: \r\n* clone this repo: https://github.com/sockjs/sockjs-node.git\r\n* in examples/echo, run : `npm install`\r\n* apply the patch below in order to be able to close a connection (by entering `close` in the echo chat)\r\n* run: `node server.js`\r\n* open: http://localhost:9999\r\n\r\n````diff\r\ndiff --git a/examples/echo/server.js b/examples/echo/server.js\r\nindex af1d015..9339954 100644\r\n--- a/examples/echo/server.js\r\n+++ b/examples/echo/server.js\r\n@@ -8,7 +8,11 @@ var sockjs_opts = {sockjs_url: \"http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.\r\n var sockjs_echo = sockjs.createServer(sockjs_opts);\r\n sockjs_echo.on('connection', function(conn) {\r\n     conn.on('data', function(message) {\r\n-        conn.write(message);\r\n+        if (message === 'close') {\r\n+          conn.close(1000, 'foobar');\r\n+        } else {\r\n+          conn.write(message);\r\n+        }\r\n     });\r\n });\r\n````\r\n\r\nResources:\r\n* The code of the parsing: https://github.com/sockjs/sockjs-client/blob/0b4879d5e0b7f44d9f8accb28759fd965f70ea1f/lib/main.js#L237-L288\r\n* The protocol documentation: https://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html\r\n\r\nFlorent"}}