{"action":"opened","number":17,"pull_request":{"url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/pulls/17","id":27401305,"html_url":"https://github.com/ejeklint/ArduinoWebsocketServer/pull/17","diff_url":"https://github.com/ejeklint/ArduinoWebsocketServer/pull/17.diff","patch_url":"https://github.com/ejeklint/ArduinoWebsocketServer/pull/17.patch","issue_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/issues/17","number":17,"state":"open","locked":false,"title":"Various long-awaited enhancements and fixes...","user":{"login":"danieloneill","id":10540429,"avatar_url":"https://avatars.githubusercontent.com/u/10540429?v=3","gravatar_id":"","url":"https://api.github.com/users/danieloneill","html_url":"https://github.com/danieloneill","followers_url":"https://api.github.com/users/danieloneill/followers","following_url":"https://api.github.com/users/danieloneill/following{/other_user}","gists_url":"https://api.github.com/users/danieloneill/gists{/gist_id}","starred_url":"https://api.github.com/users/danieloneill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieloneill/subscriptions","organizations_url":"https://api.github.com/users/danieloneill/orgs","repos_url":"https://api.github.com/users/danieloneill/repos","events_url":"https://api.github.com/users/danieloneill/events{/privacy}","received_events_url":"https://api.github.com/users/danieloneill/received_events","type":"User","site_admin":false},"body":"Please see the changelog for full details.  Some require justification:\r\n\r\n* BIG change in renaming WebSocket to WebSocketServer. This is because although it may cause a hiccup for library users, it makes more sense than WebSocket and WebSocketClient which could confuse people.\r\n* I've removed the check for the Origin header because in my tests not all WS client implementations send this. As it has no purpose or meaning besides hinging a handshake on I opted to remove it.\r\n\r\nOtherwise I cleaned up how packets are transmitted, PROGMEMed a bunch of strings to free up a large chunk of RAM, and added the ability to handle multiple simultaneous connections.\r\n\r\nWith that meant a few other minor changes, such as adding WebSocketServer::connectionCount().\r\n\r\nLogic was also simplified in places.  For example, rather than:\r\n\r\nvoid WebSocket::listen() {\r\n    EthernetClient cli;\r\n    if (cli = server.available()) {\r\n        if (cli == true) {\r\n... I do:\r\n\r\nvoid WebSocket::listen() {\r\n    EthernetClient cli = server.available();\r\n    if( !cli ) return;\r\n... (or similar.)\r\n\r\nFunctionally the only required changes to existing sketchbook code should be changing:\r\nWebSocket wsServer; to WebSocketServer wsServer;\r\n\r\nand:\r\n\r\nif( wsServer.isConnected() ) to if( wsServer.connectionCount() > 0 )\r\n\r\nI've tested exhaustively for the last few minutes, and can assure you that it has absolutely no bugs except for the ones it might or might not have.","created_at":"2015-01-15T02:12:53Z","updated_at":"2015-01-15T02:12:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/pulls/17/commits","review_comments_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/pulls/17/comments","review_comment_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/issues/17/comments","statuses_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/statuses/6fc5e6c3fb96d5db96416b1d80552ed2767529d6","head":{"label":"danieloneill:master","ref":"master","sha":"6fc5e6c3fb96d5db96416b1d80552ed2767529d6","user":{"login":"danieloneill","id":10540429,"avatar_url":"https://avatars.githubusercontent.com/u/10540429?v=3","gravatar_id":"","url":"https://api.github.com/users/danieloneill","html_url":"https://github.com/danieloneill","followers_url":"https://api.github.com/users/danieloneill/followers","following_url":"https://api.github.com/users/danieloneill/following{/other_user}","gists_url":"https://api.github.com/users/danieloneill/gists{/gist_id}","starred_url":"https://api.github.com/users/danieloneill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieloneill/subscriptions","organizations_url":"https://api.github.com/users/danieloneill/orgs","repos_url":"https://api.github.com/users/danieloneill/repos","events_url":"https://api.github.com/users/danieloneill/events{/privacy}","received_events_url":"https://api.github.com/users/danieloneill/received_events","type":"User","site_admin":false},"repo":{"id":29275217,"name":"ArduinoWebsocketServer","full_name":"danieloneill/ArduinoWebsocketServer","owner":{"login":"danieloneill","id":10540429,"avatar_url":"https://avatars.githubusercontent.com/u/10540429?v=3","gravatar_id":"","url":"https://api.github.com/users/danieloneill","html_url":"https://github.com/danieloneill","followers_url":"https://api.github.com/users/danieloneill/followers","following_url":"https://api.github.com/users/danieloneill/following{/other_user}","gists_url":"https://api.github.com/users/danieloneill/gists{/gist_id}","starred_url":"https://api.github.com/users/danieloneill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieloneill/subscriptions","organizations_url":"https://api.github.com/users/danieloneill/orgs","repos_url":"https://api.github.com/users/danieloneill/repos","events_url":"https://api.github.com/users/danieloneill/events{/privacy}","received_events_url":"https://api.github.com/users/danieloneill/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danieloneill/ArduinoWebsocketServer","description":"WebSocketServer (enhanced version from ArduinoWebsocketServer)","fork":true,"url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer","forks_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/forks","keys_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/teams","hooks_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/hooks","issue_events_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/issues/events{/number}","events_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/events","assignees_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/assignees{/user}","branches_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/branches{/branch}","tags_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/tags","blobs_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/git/refs{/sha}","trees_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/statuses/{sha}","languages_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/languages","stargazers_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/stargazers","contributors_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/contributors","subscribers_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/subscribers","subscription_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/subscription","commits_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/commits{/sha}","git_commits_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/git/commits{/sha}","comments_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/comments{/number}","issue_comment_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/issues/comments/{number}","contents_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/contents/{+path}","compare_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/merges","archive_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/downloads","issues_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/issues{/number}","pulls_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/pulls{/number}","milestones_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/milestones{/number}","notifications_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/labels{/name}","releases_url":"https://api.github.com/repos/danieloneill/ArduinoWebsocketServer/releases{/id}","created_at":"2015-01-15T01:43:45Z","updated_at":"2015-01-15T01:59:53Z","pushed_at":"2015-01-15T01:59:53Z","git_url":"git://github.com/danieloneill/ArduinoWebsocketServer.git","ssh_url":"git@github.com:danieloneill/ArduinoWebsocketServer.git","clone_url":"https://github.com/danieloneill/ArduinoWebsocketServer.git","svn_url":"https://github.com/danieloneill/ArduinoWebsocketServer","homepage":"","size":228,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ejeklint:master","ref":"master","sha":"81968df6e5e3744583c8fd2e4c733c930569da56","user":{"login":"ejeklint","id":75799,"avatar_url":"https://avatars.githubusercontent.com/u/75799?v=3","gravatar_id":"","url":"https://api.github.com/users/ejeklint","html_url":"https://github.com/ejeklint","followers_url":"https://api.github.com/users/ejeklint/followers","following_url":"https://api.github.com/users/ejeklint/following{/other_user}","gists_url":"https://api.github.com/users/ejeklint/gists{/gist_id}","starred_url":"https://api.github.com/users/ejeklint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejeklint/subscriptions","organizations_url":"https://api.github.com/users/ejeklint/orgs","repos_url":"https://api.github.com/users/ejeklint/repos","events_url":"https://api.github.com/users/ejeklint/events{/privacy}","received_events_url":"https://api.github.com/users/ejeklint/received_events","type":"User","site_admin":false},"repo":{"id":1482139,"name":"ArduinoWebsocketServer","full_name":"ejeklint/ArduinoWebsocketServer","owner":{"login":"ejeklint","id":75799,"avatar_url":"https://avatars.githubusercontent.com/u/75799?v=3","gravatar_id":"","url":"https://api.github.com/users/ejeklint","html_url":"https://github.com/ejeklint","followers_url":"https://api.github.com/users/ejeklint/followers","following_url":"https://api.github.com/users/ejeklint/following{/other_user}","gists_url":"https://api.github.com/users/ejeklint/gists{/gist_id}","starred_url":"https://api.github.com/users/ejeklint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejeklint/subscriptions","organizations_url":"https://api.github.com/users/ejeklint/orgs","repos_url":"https://api.github.com/users/ejeklint/repos","events_url":"https://api.github.com/users/ejeklint/events{/privacy}","received_events_url":"https://api.github.com/users/ejeklint/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ejeklint/ArduinoWebsocketServer","description":"","fork":false,"url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer","forks_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/forks","keys_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/teams","hooks_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/hooks","issue_events_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/issues/events{/number}","events_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/events","assignees_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/assignees{/user}","branches_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/branches{/branch}","tags_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/tags","blobs_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/git/refs{/sha}","trees_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/statuses/{sha}","languages_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/languages","stargazers_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/stargazers","contributors_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/contributors","subscribers_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/subscribers","subscription_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/subscription","commits_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/commits{/sha}","git_commits_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/git/commits{/sha}","comments_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/comments{/number}","issue_comment_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/issues/comments/{number}","contents_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/contents/{+path}","compare_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/merges","archive_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/downloads","issues_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/issues{/number}","pulls_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/pulls{/number}","milestones_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/milestones{/number}","notifications_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/labels{/name}","releases_url":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/releases{/id}","created_at":"2011-03-15T10:14:20Z","updated_at":"2014-12-17T12:07:05Z","pushed_at":"2014-10-14T13:59:31Z","git_url":"git://github.com/ejeklint/ArduinoWebsocketServer.git","ssh_url":"git@github.com:ejeklint/ArduinoWebsocketServer.git","clone_url":"https://github.com/ejeklint/ArduinoWebsocketServer.git","svn_url":"https://github.com/ejeklint/ArduinoWebsocketServer","homepage":"","size":228,"stargazers_count":61,"watchers_count":61,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":8,"forks":46,"open_issues":8,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/pulls/17"},"html":{"href":"https://github.com/ejeklint/ArduinoWebsocketServer/pull/17"},"issue":{"href":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/issues/17"},"comments":{"href":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/ejeklint/ArduinoWebsocketServer/statuses/6fc5e6c3fb96d5db96416b1d80552ed2767529d6"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":207,"deletions":119,"changed_files":5}}