{"action":"created","comment":{"url":"https://api.github.com/repos/hoaproject/Socket/pulls/comments/35536238","id":35536238,"diff_hunk":"@@ -337,14 +337,31 @@ public function disconnect()\n \n     /**\n      * Set socket.\n+     * A wrapper can be registered to handle application layer transport\n      *\n-     * @param   string  $socket    Socket URI.\n+     * @param   string  $socketUri    Socket URI.\n      * @return  \\Hoa\\Socket\n+     * @throws  \\Hoa\\Socket\\Exception\n      */\n-    protected function setSocket($socket)\n+    protected function setSocket($socketUri)\n     {\n+        $parsed = parse_url($socketUri);\n+        if (null !== $wrapper =\n+            Socket\\Transport::getWrapper($parsed['scheme'])) {\n+            $socket = call_user_func($wrapper, $socketUri);\n+            if( !($socket instanceof Socket) ) {\n+                throw new Socket\\Exception(\n+                    'The wrapper registered for scheme %s is not valid '.\n+                    'it must return a valid Hoa\\Socket instance',","path":"Connection/Connection.php","position":21,"original_position":21,"commit_id":"f2e6abf53c917554afc502c07231f581adfa8b3a","original_commit_id":"f2e6abf53c917554afc502c07231f581adfa8b3a","user":{"login":"Hywan","id":946104,"avatar_url":"https://avatars.githubusercontent.com/u/946104?v=3","gravatar_id":"","url":"https://api.github.com/users/Hywan","html_url":"https://github.com/Hywan","followers_url":"https://api.github.com/users/Hywan/followers","following_url":"https://api.github.com/users/Hywan/following{/other_user}","gists_url":"https://api.github.com/users/Hywan/gists{/gist_id}","starred_url":"https://api.github.com/users/Hywan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hywan/subscriptions","organizations_url":"https://api.github.com/users/Hywan/orgs","repos_url":"https://api.github.com/users/Hywan/repos","events_url":"https://api.github.com/users/Hywan/events{/privacy}","received_events_url":"https://api.github.com/users/Hywan/received_events","type":"User","site_admin":false},"body":"`Hoa\\Socket\\Socket` (long name in message).","created_at":"2015-07-27T13:44:06Z","updated_at":"2015-07-27T13:44:06Z","html_url":"https://github.com/hoaproject/Socket/pull/27#discussion_r35536238","pull_request_url":"https://api.github.com/repos/hoaproject/Socket/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/hoaproject/Socket/pulls/comments/35536238"},"html":{"href":"https://github.com/hoaproject/Socket/pull/27#discussion_r35536238"},"pull_request":{"href":"https://api.github.com/repos/hoaproject/Socket/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/hoaproject/Socket/pulls/27","id":40619157,"html_url":"https://github.com/hoaproject/Socket/pull/27","diff_url":"https://github.com/hoaproject/Socket/pull/27.diff","patch_url":"https://github.com/hoaproject/Socket/pull/27.patch","issue_url":"https://api.github.com/repos/hoaproject/Socket/issues/27","number":27,"state":"open","locked":false,"title":"Feature/socket factory","user":{"login":"shulard","id":482993,"avatar_url":"https://avatars.githubusercontent.com/u/482993?v=3","gravatar_id":"","url":"https://api.github.com/users/shulard","html_url":"https://github.com/shulard","followers_url":"https://api.github.com/users/shulard/followers","following_url":"https://api.github.com/users/shulard/following{/other_user}","gists_url":"https://api.github.com/users/shulard/gists{/gist_id}","starred_url":"https://api.github.com/users/shulard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shulard/subscriptions","organizations_url":"https://api.github.com/users/shulard/orgs","repos_url":"https://api.github.com/users/shulard/repos","events_url":"https://api.github.com/users/shulard/events{/privacy}","received_events_url":"https://api.github.com/users/shulard/received_events","type":"User","site_admin":false},"body":"Related to issue #26 about socket wrapper. The socket must be able to handle application layer scheme and not only transport.","created_at":"2015-07-22T22:28:32Z","updated_at":"2015-07-27T13:44:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"367c2ac3230d03290ad3415f52062610d0a835cd","assignee":{"login":"Hywan","id":946104,"avatar_url":"https://avatars.githubusercontent.com/u/946104?v=3","gravatar_id":"","url":"https://api.github.com/users/Hywan","html_url":"https://github.com/Hywan","followers_url":"https://api.github.com/users/Hywan/followers","following_url":"https://api.github.com/users/Hywan/following{/other_user}","gists_url":"https://api.github.com/users/Hywan/gists{/gist_id}","starred_url":"https://api.github.com/users/Hywan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hywan/subscriptions","organizations_url":"https://api.github.com/users/Hywan/orgs","repos_url":"https://api.github.com/users/Hywan/repos","events_url":"https://api.github.com/users/Hywan/events{/privacy}","received_events_url":"https://api.github.com/users/Hywan/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/hoaproject/Socket/pulls/27/commits","review_comments_url":"https://api.github.com/repos/hoaproject/Socket/pulls/27/comments","review_comment_url":"https://api.github.com/repos/hoaproject/Socket/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hoaproject/Socket/issues/27/comments","statuses_url":"https://api.github.com/repos/hoaproject/Socket/statuses/f2e6abf53c917554afc502c07231f581adfa8b3a","head":{"label":"shulard:feature/socket-factory","ref":"feature/socket-factory","sha":"f2e6abf53c917554afc502c07231f581adfa8b3a","user":{"login":"shulard","id":482993,"avatar_url":"https://avatars.githubusercontent.com/u/482993?v=3","gravatar_id":"","url":"https://api.github.com/users/shulard","html_url":"https://github.com/shulard","followers_url":"https://api.github.com/users/shulard/followers","following_url":"https://api.github.com/users/shulard/following{/other_user}","gists_url":"https://api.github.com/users/shulard/gists{/gist_id}","starred_url":"https://api.github.com/users/shulard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shulard/subscriptions","organizations_url":"https://api.github.com/users/shulard/orgs","repos_url":"https://api.github.com/users/shulard/repos","events_url":"https://api.github.com/users/shulard/events{/privacy}","received_events_url":"https://api.github.com/users/shulard/received_events","type":"User","site_admin":false},"repo":{"id":39506938,"name":"Socket","full_name":"shulard/Socket","owner":{"login":"shulard","id":482993,"avatar_url":"https://avatars.githubusercontent.com/u/482993?v=3","gravatar_id":"","url":"https://api.github.com/users/shulard","html_url":"https://github.com/shulard","followers_url":"https://api.github.com/users/shulard/followers","following_url":"https://api.github.com/users/shulard/following{/other_user}","gists_url":"https://api.github.com/users/shulard/gists{/gist_id}","starred_url":"https://api.github.com/users/shulard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shulard/subscriptions","organizations_url":"https://api.github.com/users/shulard/orgs","repos_url":"https://api.github.com/users/shulard/repos","events_url":"https://api.github.com/users/shulard/events{/privacy}","received_events_url":"https://api.github.com/users/shulard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shulard/Socket","description":"The Hoa\\Socket library.","fork":true,"url":"https://api.github.com/repos/shulard/Socket","forks_url":"https://api.github.com/repos/shulard/Socket/forks","keys_url":"https://api.github.com/repos/shulard/Socket/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shulard/Socket/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shulard/Socket/teams","hooks_url":"https://api.github.com/repos/shulard/Socket/hooks","issue_events_url":"https://api.github.com/repos/shulard/Socket/issues/events{/number}","events_url":"https://api.github.com/repos/shulard/Socket/events","assignees_url":"https://api.github.com/repos/shulard/Socket/assignees{/user}","branches_url":"https://api.github.com/repos/shulard/Socket/branches{/branch}","tags_url":"https://api.github.com/repos/shulard/Socket/tags","blobs_url":"https://api.github.com/repos/shulard/Socket/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shulard/Socket/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shulard/Socket/git/refs{/sha}","trees_url":"https://api.github.com/repos/shulard/Socket/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shulard/Socket/statuses/{sha}","languages_url":"https://api.github.com/repos/shulard/Socket/languages","stargazers_url":"https://api.github.com/repos/shulard/Socket/stargazers","contributors_url":"https://api.github.com/repos/shulard/Socket/contributors","subscribers_url":"https://api.github.com/repos/shulard/Socket/subscribers","subscription_url":"https://api.github.com/repos/shulard/Socket/subscription","commits_url":"https://api.github.com/repos/shulard/Socket/commits{/sha}","git_commits_url":"https://api.github.com/repos/shulard/Socket/git/commits{/sha}","comments_url":"https://api.github.com/repos/shulard/Socket/comments{/number}","issue_comment_url":"https://api.github.com/repos/shulard/Socket/issues/comments{/number}","contents_url":"https://api.github.com/repos/shulard/Socket/contents/{+path}","compare_url":"https://api.github.com/repos/shulard/Socket/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shulard/Socket/merges","archive_url":"https://api.github.com/repos/shulard/Socket/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shulard/Socket/downloads","issues_url":"https://api.github.com/repos/shulard/Socket/issues{/number}","pulls_url":"https://api.github.com/repos/shulard/Socket/pulls{/number}","milestones_url":"https://api.github.com/repos/shulard/Socket/milestones{/number}","notifications_url":"https://api.github.com/repos/shulard/Socket/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shulard/Socket/labels{/name}","releases_url":"https://api.github.com/repos/shulard/Socket/releases{/id}","created_at":"2015-07-22T13:15:14Z","updated_at":"2015-07-22T13:15:15Z","pushed_at":"2015-07-27T13:36:05Z","git_url":"git://github.com/shulard/Socket.git","ssh_url":"git@github.com:shulard/Socket.git","clone_url":"https://github.com/shulard/Socket.git","svn_url":"https://github.com/shulard/Socket","homepage":"http://hoa-project.net/","size":268,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"hoaproject:master","ref":"master","sha":"0b0f4c33b55f7a0fefdb252a02375f3ce49ac9c0","user":{"login":"hoaproject","id":1519718,"avatar_url":"https://avatars.githubusercontent.com/u/1519718?v=3","gravatar_id":"","url":"https://api.github.com/users/hoaproject","html_url":"https://github.com/hoaproject","followers_url":"https://api.github.com/users/hoaproject/followers","following_url":"https://api.github.com/users/hoaproject/following{/other_user}","gists_url":"https://api.github.com/users/hoaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/hoaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoaproject/subscriptions","organizations_url":"https://api.github.com/users/hoaproject/orgs","repos_url":"https://api.github.com/users/hoaproject/repos","events_url":"https://api.github.com/users/hoaproject/events{/privacy}","received_events_url":"https://api.github.com/users/hoaproject/received_events","type":"Organization","site_admin":false},"repo":{"id":5538849,"name":"Socket","full_name":"hoaproject/Socket","owner":{"login":"hoaproject","id":1519718,"avatar_url":"https://avatars.githubusercontent.com/u/1519718?v=3","gravatar_id":"","url":"https://api.github.com/users/hoaproject","html_url":"https://github.com/hoaproject","followers_url":"https://api.github.com/users/hoaproject/followers","following_url":"https://api.github.com/users/hoaproject/following{/other_user}","gists_url":"https://api.github.com/users/hoaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/hoaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoaproject/subscriptions","organizations_url":"https://api.github.com/users/hoaproject/orgs","repos_url":"https://api.github.com/users/hoaproject/repos","events_url":"https://api.github.com/users/hoaproject/events{/privacy}","received_events_url":"https://api.github.com/users/hoaproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hoaproject/Socket","description":"The Hoa\\Socket library.","fork":false,"url":"https://api.github.com/repos/hoaproject/Socket","forks_url":"https://api.github.com/repos/hoaproject/Socket/forks","keys_url":"https://api.github.com/repos/hoaproject/Socket/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hoaproject/Socket/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hoaproject/Socket/teams","hooks_url":"https://api.github.com/repos/hoaproject/Socket/hooks","issue_events_url":"https://api.github.com/repos/hoaproject/Socket/issues/events{/number}","events_url":"https://api.github.com/repos/hoaproject/Socket/events","assignees_url":"https://api.github.com/repos/hoaproject/Socket/assignees{/user}","branches_url":"https://api.github.com/repos/hoaproject/Socket/branches{/branch}","tags_url":"https://api.github.com/repos/hoaproject/Socket/tags","blobs_url":"https://api.github.com/repos/hoaproject/Socket/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hoaproject/Socket/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hoaproject/Socket/git/refs{/sha}","trees_url":"https://api.github.com/repos/hoaproject/Socket/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hoaproject/Socket/statuses/{sha}","languages_url":"https://api.github.com/repos/hoaproject/Socket/languages","stargazers_url":"https://api.github.com/repos/hoaproject/Socket/stargazers","contributors_url":"https://api.github.com/repos/hoaproject/Socket/contributors","subscribers_url":"https://api.github.com/repos/hoaproject/Socket/subscribers","subscription_url":"https://api.github.com/repos/hoaproject/Socket/subscription","commits_url":"https://api.github.com/repos/hoaproject/Socket/commits{/sha}","git_commits_url":"https://api.github.com/repos/hoaproject/Socket/git/commits{/sha}","comments_url":"https://api.github.com/repos/hoaproject/Socket/comments{/number}","issue_comment_url":"https://api.github.com/repos/hoaproject/Socket/issues/comments{/number}","contents_url":"https://api.github.com/repos/hoaproject/Socket/contents/{+path}","compare_url":"https://api.github.com/repos/hoaproject/Socket/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hoaproject/Socket/merges","archive_url":"https://api.github.com/repos/hoaproject/Socket/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hoaproject/Socket/downloads","issues_url":"https://api.github.com/repos/hoaproject/Socket/issues{/number}","pulls_url":"https://api.github.com/repos/hoaproject/Socket/pulls{/number}","milestones_url":"https://api.github.com/repos/hoaproject/Socket/milestones{/number}","notifications_url":"https://api.github.com/repos/hoaproject/Socket/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hoaproject/Socket/labels{/name}","releases_url":"https://api.github.com/repos/hoaproject/Socket/releases{/id}","created_at":"2012-08-24T10:31:28Z","updated_at":"2015-07-26T04:15:52Z","pushed_at":"2015-07-27T13:36:05Z","git_url":"git://github.com/hoaproject/Socket.git","ssh_url":"git@github.com:hoaproject/Socket.git","clone_url":"https://github.com/hoaproject/Socket.git","svn_url":"https://github.com/hoaproject/Socket","homepage":"http://hoa-project.net/","size":601,"stargazers_count":12,"watchers_count":12,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":4,"forks":10,"open_issues":4,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hoaproject/Socket/pulls/27"},"html":{"href":"https://github.com/hoaproject/Socket/pull/27"},"issue":{"href":"https://api.github.com/repos/hoaproject/Socket/issues/27"},"comments":{"href":"https://api.github.com/repos/hoaproject/Socket/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/hoaproject/Socket/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/hoaproject/Socket/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hoaproject/Socket/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/hoaproject/Socket/statuses/f2e6abf53c917554afc502c07231f581adfa8b3a"}}}}