{"action":"created","issue":{"url":"https://api.github.com/repos/uWebSockets/uWebSockets/issues/191","repository_url":"https://api.github.com/repos/uWebSockets/uWebSockets","labels_url":"https://api.github.com/repos/uWebSockets/uWebSockets/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/uWebSockets/uWebSockets/issues/191/comments","events_url":"https://api.github.com/repos/uWebSockets/uWebSockets/issues/191/events","html_url":"https://github.com/uWebSockets/uWebSockets/issues/191","id":165636074,"number":191,"title":"Server option pingInterval","user":{"login":"alexhultman","id":3397140,"avatar_url":"https://avatars.githubusercontent.com/u/3397140?v=3","gravatar_id":"","url":"https://api.github.com/users/alexhultman","html_url":"https://github.com/alexhultman","followers_url":"https://api.github.com/users/alexhultman/followers","following_url":"https://api.github.com/users/alexhultman/following{/other_user}","gists_url":"https://api.github.com/users/alexhultman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexhultman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexhultman/subscriptions","organizations_url":"https://api.github.com/users/alexhultman/orgs","repos_url":"https://api.github.com/users/alexhultman/repos","events_url":"https://api.github.com/users/alexhultman/events{/privacy}","received_events_url":"https://api.github.com/users/alexhultman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/uWebSockets/uWebSockets/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-14T19:11:26Z","updated_at":"2016-07-21T13:42:10Z","closed_at":null,"body":"I can't find any automatic ping/timeout support in ws? To properly track disconnections you need to ping and this is very inefficient from the JavaScript interface (you need to keep a vector of all the sockets and iterate over them and keep track of timeouts and remove/add to this vector which is all very inefficient).\r\n\r\npingInterval could be a simple integer option you pass, pingInterval: 10000 will disconnect any client not sending a pong within 10 seconds from getting a ping.\r\n\r\nDoes a similar thing exist in ws? Would this feature be helpful? I could use the optimized broadcast internally to broadcast the ping in a much more efficient way than possible with the JavaScript interface."},"comment":{"url":"https://api.github.com/repos/uWebSockets/uWebSockets/issues/comments/234256408","html_url":"https://github.com/uWebSockets/uWebSockets/issues/191#issuecomment-234256408","issue_url":"https://api.github.com/repos/uWebSockets/uWebSockets/issues/191","id":234256408,"user":{"login":"sanderploegsma","id":1564254,"avatar_url":"https://avatars.githubusercontent.com/u/1564254?v=3","gravatar_id":"","url":"https://api.github.com/users/sanderploegsma","html_url":"https://github.com/sanderploegsma","followers_url":"https://api.github.com/users/sanderploegsma/followers","following_url":"https://api.github.com/users/sanderploegsma/following{/other_user}","gists_url":"https://api.github.com/users/sanderploegsma/gists{/gist_id}","starred_url":"https://api.github.com/users/sanderploegsma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanderploegsma/subscriptions","organizations_url":"https://api.github.com/users/sanderploegsma/orgs","repos_url":"https://api.github.com/users/sanderploegsma/repos","events_url":"https://api.github.com/users/sanderploegsma/events{/privacy}","received_events_url":"https://api.github.com/users/sanderploegsma/received_events","type":"User","site_admin":false},"created_at":"2016-07-21T13:42:10Z","updated_at":"2016-07-21T13:42:10Z","body":"> Also, it might be a good idea to automatically pong on ping from the client (if it already doesn't exist), emitting a \"ping\" event.\r\n\r\nNB: This is already implemented (I actually proposed a PR for the 'ping' event). When the server receives a ping, it'll automatically send back a 'pong'. "}}
{"actor":{"display_login":"sanderploegsma"}}