{"action":"created","comment":{"url":"https://api.github.com/repos/andreas83/SocialNetwork/pulls/comments/44273518","id":44273518,"diff_hunk":"@@ -0,0 +1,607 @@\n+<?php\n+\n+\n+require_once('WebSocketUser.php');\n+\n+abstract class WebSocketServer {\n+\n+  protected $userClass = 'WebSocketUser'; // redefine this if you want a custom user class.  The custom user class should inherit from WebSocketUser.\n+  protected $maxBufferSize;        \n+  protected $master;\n+  protected $sockets                              = array();\n+  protected $users                                = array();\n+  protected $heldMessages                         = array();\n+  protected $interactive                          = true;\n+  protected $headerOriginRequired                 = false;\n+  protected $headerSecWebSocketProtocolRequired   = false;\n+  protected $headerSecWebSocketExtensionsRequired = false;\n+\n+  function __construct($addr, $port, $bufferLength = 2048) {\n+    $this->maxBufferSize = $bufferLength;\n+    $this->master = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)  or die(\"Failed: socket_create()\");","path":"app/server/websocketServer.php","position":21,"original_position":21,"commit_id":"dbccb1604c4774acbd4faf6fb318e359a8790a97","original_commit_id":"dbccb1604c4774acbd4faf6fb318e359a8790a97","user":{"login":"chilimatic","id":6705416,"avatar_url":"https://avatars.githubusercontent.com/u/6705416?v=3","gravatar_id":"","url":"https://api.github.com/users/chilimatic","html_url":"https://github.com/chilimatic","followers_url":"https://api.github.com/users/chilimatic/followers","following_url":"https://api.github.com/users/chilimatic/following{/other_user}","gists_url":"https://api.github.com/users/chilimatic/gists{/gist_id}","starred_url":"https://api.github.com/users/chilimatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chilimatic/subscriptions","organizations_url":"https://api.github.com/users/chilimatic/orgs","repos_url":"https://api.github.com/users/chilimatic/repos","events_url":"https://api.github.com/users/chilimatic/events{/privacy}","received_events_url":"https://api.github.com/users/chilimatic/received_events","type":"User","site_admin":false},"body":"ich weiß die ist oldschool aber wie wär's mit exceptions ? :D sind irgendwie besser zum tracken :) vor allem kannst diese evtl mit monolog oder einem anderen log stream einfach in kibana oder ein tool deiner wahl streamen :)","created_at":"2015-11-09T13:22:54Z","updated_at":"2015-11-09T13:22:54Z","html_url":"https://github.com/andreas83/SocialNetwork/pull/21#discussion_r44273518","pull_request_url":"https://api.github.com/repos/andreas83/SocialNetwork/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/andreas83/SocialNetwork/pulls/comments/44273518"},"html":{"href":"https://github.com/andreas83/SocialNetwork/pull/21#discussion_r44273518"},"pull_request":{"href":"https://api.github.com/repos/andreas83/SocialNetwork/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/andreas83/SocialNetwork/pulls/21","id":50094779,"html_url":"https://github.com/andreas83/SocialNetwork/pull/21","diff_url":"https://github.com/andreas83/SocialNetwork/pull/21.diff","patch_url":"https://github.com/andreas83/SocialNetwork/pull/21.patch","issue_url":"https://api.github.com/repos/andreas83/SocialNetwork/issues/21","number":21,"state":"open","locked":false,"title":"Merge latest changes","user":{"login":"andreas83","id":3380468,"avatar_url":"https://avatars.githubusercontent.com/u/3380468?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas83","html_url":"https://github.com/andreas83","followers_url":"https://api.github.com/users/andreas83/followers","following_url":"https://api.github.com/users/andreas83/following{/other_user}","gists_url":"https://api.github.com/users/andreas83/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas83/subscriptions","organizations_url":"https://api.github.com/users/andreas83/orgs","repos_url":"https://api.github.com/users/andreas83/repos","events_url":"https://api.github.com/users/andreas83/events{/privacy}","received_events_url":"https://api.github.com/users/andreas83/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-09T08:16:25Z","updated_at":"2015-11-09T13:22:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd641dc64e19a9e46ee437c59d33e1ac69ed7a5b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andreas83/SocialNetwork/pulls/21/commits","review_comments_url":"https://api.github.com/repos/andreas83/SocialNetwork/pulls/21/comments","review_comment_url":"https://api.github.com/repos/andreas83/SocialNetwork/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andreas83/SocialNetwork/issues/21/comments","statuses_url":"https://api.github.com/repos/andreas83/SocialNetwork/statuses/dbccb1604c4774acbd4faf6fb318e359a8790a97","head":{"label":"andreas83:andrea","ref":"andrea","sha":"dbccb1604c4774acbd4faf6fb318e359a8790a97","user":{"login":"andreas83","id":3380468,"avatar_url":"https://avatars.githubusercontent.com/u/3380468?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas83","html_url":"https://github.com/andreas83","followers_url":"https://api.github.com/users/andreas83/followers","following_url":"https://api.github.com/users/andreas83/following{/other_user}","gists_url":"https://api.github.com/users/andreas83/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas83/subscriptions","organizations_url":"https://api.github.com/users/andreas83/orgs","repos_url":"https://api.github.com/users/andreas83/repos","events_url":"https://api.github.com/users/andreas83/events{/privacy}","received_events_url":"https://api.github.com/users/andreas83/received_events","type":"User","site_admin":false},"repo":{"id":43714438,"name":"SocialNetwork","full_name":"andreas83/SocialNetwork","owner":{"login":"andreas83","id":3380468,"avatar_url":"https://avatars.githubusercontent.com/u/3380468?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas83","html_url":"https://github.com/andreas83","followers_url":"https://api.github.com/users/andreas83/followers","following_url":"https://api.github.com/users/andreas83/following{/other_user}","gists_url":"https://api.github.com/users/andreas83/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas83/subscriptions","organizations_url":"https://api.github.com/users/andreas83/orgs","repos_url":"https://api.github.com/users/andreas83/repos","events_url":"https://api.github.com/users/andreas83/events{/privacy}","received_events_url":"https://api.github.com/users/andreas83/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreas83/SocialNetwork","description":"share videos, websites, images and sourcecode","fork":false,"url":"https://api.github.com/repos/andreas83/SocialNetwork","forks_url":"https://api.github.com/repos/andreas83/SocialNetwork/forks","keys_url":"https://api.github.com/repos/andreas83/SocialNetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreas83/SocialNetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreas83/SocialNetwork/teams","hooks_url":"https://api.github.com/repos/andreas83/SocialNetwork/hooks","issue_events_url":"https://api.github.com/repos/andreas83/SocialNetwork/issues/events{/number}","events_url":"https://api.github.com/repos/andreas83/SocialNetwork/events","assignees_url":"https://api.github.com/repos/andreas83/SocialNetwork/assignees{/user}","branches_url":"https://api.github.com/repos/andreas83/SocialNetwork/branches{/branch}","tags_url":"https://api.github.com/repos/andreas83/SocialNetwork/tags","blobs_url":"https://api.github.com/repos/andreas83/SocialNetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreas83/SocialNetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreas83/SocialNetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreas83/SocialNetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreas83/SocialNetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/andreas83/SocialNetwork/languages","stargazers_url":"https://api.github.com/repos/andreas83/SocialNetwork/stargazers","contributors_url":"https://api.github.com/repos/andreas83/SocialNetwork/contributors","subscribers_url":"https://api.github.com/repos/andreas83/SocialNetwork/subscribers","subscription_url":"https://api.github.com/repos/andreas83/SocialNetwork/subscription","commits_url":"https://api.github.com/repos/andreas83/SocialNetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreas83/SocialNetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreas83/SocialNetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreas83/SocialNetwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreas83/SocialNetwork/contents/{+path}","compare_url":"https://api.github.com/repos/andreas83/SocialNetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreas83/SocialNetwork/merges","archive_url":"https://api.github.com/repos/andreas83/SocialNetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreas83/SocialNetwork/downloads","issues_url":"https://api.github.com/repos/andreas83/SocialNetwork/issues{/number}","pulls_url":"https://api.github.com/repos/andreas83/SocialNetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/andreas83/SocialNetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/andreas83/SocialNetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreas83/SocialNetwork/labels{/name}","releases_url":"https://api.github.com/repos/andreas83/SocialNetwork/releases{/id}","created_at":"2015-10-05T21:19:14Z","updated_at":"2015-10-19T08:14:20Z","pushed_at":"2015-11-09T08:16:25Z","git_url":"git://github.com/andreas83/SocialNetwork.git","ssh_url":"git@github.com:andreas83/SocialNetwork.git","clone_url":"https://github.com/andreas83/SocialNetwork.git","svn_url":"https://github.com/andreas83/SocialNetwork","homepage":"","size":8748,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":1,"default_branch":"andrea"}},"base":{"label":"andreas83:stable","ref":"stable","sha":"67f5eee9ee651f3be2bf672fd0e701d755cc4471","user":{"login":"andreas83","id":3380468,"avatar_url":"https://avatars.githubusercontent.com/u/3380468?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas83","html_url":"https://github.com/andreas83","followers_url":"https://api.github.com/users/andreas83/followers","following_url":"https://api.github.com/users/andreas83/following{/other_user}","gists_url":"https://api.github.com/users/andreas83/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas83/subscriptions","organizations_url":"https://api.github.com/users/andreas83/orgs","repos_url":"https://api.github.com/users/andreas83/repos","events_url":"https://api.github.com/users/andreas83/events{/privacy}","received_events_url":"https://api.github.com/users/andreas83/received_events","type":"User","site_admin":false},"repo":{"id":43714438,"name":"SocialNetwork","full_name":"andreas83/SocialNetwork","owner":{"login":"andreas83","id":3380468,"avatar_url":"https://avatars.githubusercontent.com/u/3380468?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas83","html_url":"https://github.com/andreas83","followers_url":"https://api.github.com/users/andreas83/followers","following_url":"https://api.github.com/users/andreas83/following{/other_user}","gists_url":"https://api.github.com/users/andreas83/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas83/subscriptions","organizations_url":"https://api.github.com/users/andreas83/orgs","repos_url":"https://api.github.com/users/andreas83/repos","events_url":"https://api.github.com/users/andreas83/events{/privacy}","received_events_url":"https://api.github.com/users/andreas83/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreas83/SocialNetwork","description":"share videos, websites, images and sourcecode","fork":false,"url":"https://api.github.com/repos/andreas83/SocialNetwork","forks_url":"https://api.github.com/repos/andreas83/SocialNetwork/forks","keys_url":"https://api.github.com/repos/andreas83/SocialNetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreas83/SocialNetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreas83/SocialNetwork/teams","hooks_url":"https://api.github.com/repos/andreas83/SocialNetwork/hooks","issue_events_url":"https://api.github.com/repos/andreas83/SocialNetwork/issues/events{/number}","events_url":"https://api.github.com/repos/andreas83/SocialNetwork/events","assignees_url":"https://api.github.com/repos/andreas83/SocialNetwork/assignees{/user}","branches_url":"https://api.github.com/repos/andreas83/SocialNetwork/branches{/branch}","tags_url":"https://api.github.com/repos/andreas83/SocialNetwork/tags","blobs_url":"https://api.github.com/repos/andreas83/SocialNetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreas83/SocialNetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreas83/SocialNetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreas83/SocialNetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreas83/SocialNetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/andreas83/SocialNetwork/languages","stargazers_url":"https://api.github.com/repos/andreas83/SocialNetwork/stargazers","contributors_url":"https://api.github.com/repos/andreas83/SocialNetwork/contributors","subscribers_url":"https://api.github.com/repos/andreas83/SocialNetwork/subscribers","subscription_url":"https://api.github.com/repos/andreas83/SocialNetwork/subscription","commits_url":"https://api.github.com/repos/andreas83/SocialNetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreas83/SocialNetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreas83/SocialNetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreas83/SocialNetwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreas83/SocialNetwork/contents/{+path}","compare_url":"https://api.github.com/repos/andreas83/SocialNetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreas83/SocialNetwork/merges","archive_url":"https://api.github.com/repos/andreas83/SocialNetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreas83/SocialNetwork/downloads","issues_url":"https://api.github.com/repos/andreas83/SocialNetwork/issues{/number}","pulls_url":"https://api.github.com/repos/andreas83/SocialNetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/andreas83/SocialNetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/andreas83/SocialNetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreas83/SocialNetwork/labels{/name}","releases_url":"https://api.github.com/repos/andreas83/SocialNetwork/releases{/id}","created_at":"2015-10-05T21:19:14Z","updated_at":"2015-10-19T08:14:20Z","pushed_at":"2015-11-09T08:16:25Z","git_url":"git://github.com/andreas83/SocialNetwork.git","ssh_url":"git@github.com:andreas83/SocialNetwork.git","clone_url":"https://github.com/andreas83/SocialNetwork.git","svn_url":"https://github.com/andreas83/SocialNetwork","homepage":"","size":8748,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":1,"default_branch":"andrea"}},"_links":{"self":{"href":"https://api.github.com/repos/andreas83/SocialNetwork/pulls/21"},"html":{"href":"https://github.com/andreas83/SocialNetwork/pull/21"},"issue":{"href":"https://api.github.com/repos/andreas83/SocialNetwork/issues/21"},"comments":{"href":"https://api.github.com/repos/andreas83/SocialNetwork/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/andreas83/SocialNetwork/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/andreas83/SocialNetwork/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andreas83/SocialNetwork/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/andreas83/SocialNetwork/statuses/dbccb1604c4774acbd4faf6fb318e359a8790a97"}}}}