{"action":"created","comment":{"url":"https://api.github.com/repos/eventmachine/eventmachine/pulls/comments/81827146","pull_request_review_id":2776883,"id":81827146,"diff_hunk":"@@ -881,6 +881,19 @@ def self.open_datagram_socket address, port, handler=nil, *args\n     c\n   end\n \n+  # Same as open_datagram_socket but also multicast subscribes\n+  def self.open_datagram_socket_and_mcastjoin address, port, handler=nil, *args\n+\n+    klass = klass_from_handler(Connection, handler, *args)\n+    s = EM::open_udp_socket address, port.to_i\n+    ip =  IPAddr.new( address ).hton + IPAddr.new(\"0.0.0.0\").hton\n+    set_sock_opt s, Socket::IPPROTO_IP, Socket::IP_ADD_MEMBERSHIP, ip","path":"lib/eventmachine.rb","position":10,"original_position":10,"commit_id":"1e62ef8c9a2de395741976280d8996c78d83df2d","original_commit_id":"1e62ef8c9a2de395741976280d8996c78d83df2d","user":{"login":"sodabrew","id":39406,"avatar_url":"https://avatars.githubusercontent.com/u/39406?v=3","gravatar_id":"","url":"https://api.github.com/users/sodabrew","html_url":"https://github.com/sodabrew","followers_url":"https://api.github.com/users/sodabrew/followers","following_url":"https://api.github.com/users/sodabrew/following{/other_user}","gists_url":"https://api.github.com/users/sodabrew/gists{/gist_id}","starred_url":"https://api.github.com/users/sodabrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sodabrew/subscriptions","organizations_url":"https://api.github.com/users/sodabrew/orgs","repos_url":"https://api.github.com/users/sodabrew/repos","events_url":"https://api.github.com/users/sodabrew/events{/privacy}","received_events_url":"https://api.github.com/users/sodabrew/received_events","type":"User","site_admin":false},"body":"I'm a little worried about this creating a precedent for adding separate top-level methods for each sockopt you might want to set. Could you do the IP_ADD_MEMBERSHIP in the post_init of your connection handler class?","created_at":"2016-10-04T18:50:52Z","updated_at":"2016-10-04T18:51:11Z","html_url":"https://github.com/eventmachine/eventmachine/pull/736#discussion_r81827146","pull_request_url":"https://api.github.com/repos/eventmachine/eventmachine/pulls/736","_links":{"self":{"href":"https://api.github.com/repos/eventmachine/eventmachine/pulls/comments/81827146"},"html":{"href":"https://github.com/eventmachine/eventmachine/pull/736#discussion_r81827146"},"pull_request":{"href":"https://api.github.com/repos/eventmachine/eventmachine/pulls/736"}}},"pull_request":{"url":"https://api.github.com/repos/eventmachine/eventmachine/pulls/736","id":87948713,"html_url":"https://github.com/eventmachine/eventmachine/pull/736","diff_url":"https://github.com/eventmachine/eventmachine/pull/736.diff","patch_url":"https://github.com/eventmachine/eventmachine/pull/736.patch","issue_url":"https://api.github.com/repos/eventmachine/eventmachine/issues/736","number":736,"state":"open","locked":false,"title":"Add ability to subscribe to multicast channels","user":{"login":"poulh","id":274818,"avatar_url":"https://avatars.githubusercontent.com/u/274818?v=3","gravatar_id":"","url":"https://api.github.com/users/poulh","html_url":"https://github.com/poulh","followers_url":"https://api.github.com/users/poulh/followers","following_url":"https://api.github.com/users/poulh/following{/other_user}","gists_url":"https://api.github.com/users/poulh/gists{/gist_id}","starred_url":"https://api.github.com/users/poulh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poulh/subscriptions","organizations_url":"https://api.github.com/users/poulh/orgs","repos_url":"https://api.github.com/users/poulh/repos","events_url":"https://api.github.com/users/poulh/events{/privacy}","received_events_url":"https://api.github.com/users/poulh/received_events","type":"User","site_admin":false},"body":"With this change I can subscribe to multicast data by mcastjoining the passed in host/port.\r\n\r\nbefore i could not access the socket to do the mcast subscription.","created_at":"2016-10-04T18:31:20Z","updated_at":"2016-10-04T18:51:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f234cffdcae5f1335fc54b4073456ef0203f35d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/eventmachine/eventmachine/pulls/736/commits","review_comments_url":"https://api.github.com/repos/eventmachine/eventmachine/pulls/736/comments","review_comment_url":"https://api.github.com/repos/eventmachine/eventmachine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eventmachine/eventmachine/issues/736/comments","statuses_url":"https://api.github.com/repos/eventmachine/eventmachine/statuses/1e62ef8c9a2de395741976280d8996c78d83df2d","head":{"label":"athenacr:master","ref":"master","sha":"1e62ef8c9a2de395741976280d8996c78d83df2d","user":{"login":"athenacr","id":725732,"avatar_url":"https://avatars.githubusercontent.com/u/725732?v=3","gravatar_id":"","url":"https://api.github.com/users/athenacr","html_url":"https://github.com/athenacr","followers_url":"https://api.github.com/users/athenacr/followers","following_url":"https://api.github.com/users/athenacr/following{/other_user}","gists_url":"https://api.github.com/users/athenacr/gists{/gist_id}","starred_url":"https://api.github.com/users/athenacr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/athenacr/subscriptions","organizations_url":"https://api.github.com/users/athenacr/orgs","repos_url":"https://api.github.com/users/athenacr/repos","events_url":"https://api.github.com/users/athenacr/events{/privacy}","received_events_url":"https://api.github.com/users/athenacr/received_events","type":"Organization","site_admin":false},"repo":{"id":69993540,"name":"eventmachine","full_name":"athenacr/eventmachine","owner":{"login":"athenacr","id":725732,"avatar_url":"https://avatars.githubusercontent.com/u/725732?v=3","gravatar_id":"","url":"https://api.github.com/users/athenacr","html_url":"https://github.com/athenacr","followers_url":"https://api.github.com/users/athenacr/followers","following_url":"https://api.github.com/users/athenacr/following{/other_user}","gists_url":"https://api.github.com/users/athenacr/gists{/gist_id}","starred_url":"https://api.github.com/users/athenacr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/athenacr/subscriptions","organizations_url":"https://api.github.com/users/athenacr/orgs","repos_url":"https://api.github.com/users/athenacr/repos","events_url":"https://api.github.com/users/athenacr/events{/privacy}","received_events_url":"https://api.github.com/users/athenacr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/athenacr/eventmachine","description":"EventMachine: fast, simple event-processing library for Ruby programs","fork":true,"url":"https://api.github.com/repos/athenacr/eventmachine","forks_url":"https://api.github.com/repos/athenacr/eventmachine/forks","keys_url":"https://api.github.com/repos/athenacr/eventmachine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/athenacr/eventmachine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/athenacr/eventmachine/teams","hooks_url":"https://api.github.com/repos/athenacr/eventmachine/hooks","issue_events_url":"https://api.github.com/repos/athenacr/eventmachine/issues/events{/number}","events_url":"https://api.github.com/repos/athenacr/eventmachine/events","assignees_url":"https://api.github.com/repos/athenacr/eventmachine/assignees{/user}","branches_url":"https://api.github.com/repos/athenacr/eventmachine/branches{/branch}","tags_url":"https://api.github.com/repos/athenacr/eventmachine/tags","blobs_url":"https://api.github.com/repos/athenacr/eventmachine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/athenacr/eventmachine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/athenacr/eventmachine/git/refs{/sha}","trees_url":"https://api.github.com/repos/athenacr/eventmachine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/athenacr/eventmachine/statuses/{sha}","languages_url":"https://api.github.com/repos/athenacr/eventmachine/languages","stargazers_url":"https://api.github.com/repos/athenacr/eventmachine/stargazers","contributors_url":"https://api.github.com/repos/athenacr/eventmachine/contributors","subscribers_url":"https://api.github.com/repos/athenacr/eventmachine/subscribers","subscription_url":"https://api.github.com/repos/athenacr/eventmachine/subscription","commits_url":"https://api.github.com/repos/athenacr/eventmachine/commits{/sha}","git_commits_url":"https://api.github.com/repos/athenacr/eventmachine/git/commits{/sha}","comments_url":"https://api.github.com/repos/athenacr/eventmachine/comments{/number}","issue_comment_url":"https://api.github.com/repos/athenacr/eventmachine/issues/comments{/number}","contents_url":"https://api.github.com/repos/athenacr/eventmachine/contents/{+path}","compare_url":"https://api.github.com/repos/athenacr/eventmachine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/athenacr/eventmachine/merges","archive_url":"https://api.github.com/repos/athenacr/eventmachine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/athenacr/eventmachine/downloads","issues_url":"https://api.github.com/repos/athenacr/eventmachine/issues{/number}","pulls_url":"https://api.github.com/repos/athenacr/eventmachine/pulls{/number}","milestones_url":"https://api.github.com/repos/athenacr/eventmachine/milestones{/number}","notifications_url":"https://api.github.com/repos/athenacr/eventmachine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/athenacr/eventmachine/labels{/name}","releases_url":"https://api.github.com/repos/athenacr/eventmachine/releases{/id}","deployments_url":"https://api.github.com/repos/athenacr/eventmachine/deployments","created_at":"2016-10-04T18:23:44Z","updated_at":"2016-10-04T18:23:46Z","pushed_at":"2016-10-04T18:29:13Z","git_url":"git://github.com/athenacr/eventmachine.git","ssh_url":"git@github.com:athenacr/eventmachine.git","clone_url":"https://github.com/athenacr/eventmachine.git","svn_url":"https://github.com/athenacr/eventmachine","homepage":"http://www.rubyeventmachine.com","size":3728,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"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":"eventmachine:master","ref":"master","sha":"debad3c6a3d623ae2fe5e2495ce6a5e18e6ba1e8","user":{"login":"eventmachine","id":20947,"avatar_url":"https://avatars.githubusercontent.com/u/20947?v=3","gravatar_id":"","url":"https://api.github.com/users/eventmachine","html_url":"https://github.com/eventmachine","followers_url":"https://api.github.com/users/eventmachine/followers","following_url":"https://api.github.com/users/eventmachine/following{/other_user}","gists_url":"https://api.github.com/users/eventmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/eventmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eventmachine/subscriptions","organizations_url":"https://api.github.com/users/eventmachine/orgs","repos_url":"https://api.github.com/users/eventmachine/repos","events_url":"https://api.github.com/users/eventmachine/events{/privacy}","received_events_url":"https://api.github.com/users/eventmachine/received_events","type":"Organization","site_admin":false},"repo":{"id":43371,"name":"eventmachine","full_name":"eventmachine/eventmachine","owner":{"login":"eventmachine","id":20947,"avatar_url":"https://avatars.githubusercontent.com/u/20947?v=3","gravatar_id":"","url":"https://api.github.com/users/eventmachine","html_url":"https://github.com/eventmachine","followers_url":"https://api.github.com/users/eventmachine/followers","following_url":"https://api.github.com/users/eventmachine/following{/other_user}","gists_url":"https://api.github.com/users/eventmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/eventmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eventmachine/subscriptions","organizations_url":"https://api.github.com/users/eventmachine/orgs","repos_url":"https://api.github.com/users/eventmachine/repos","events_url":"https://api.github.com/users/eventmachine/events{/privacy}","received_events_url":"https://api.github.com/users/eventmachine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eventmachine/eventmachine","description":"EventMachine: fast, simple event-processing library for Ruby programs","fork":false,"url":"https://api.github.com/repos/eventmachine/eventmachine","forks_url":"https://api.github.com/repos/eventmachine/eventmachine/forks","keys_url":"https://api.github.com/repos/eventmachine/eventmachine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eventmachine/eventmachine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eventmachine/eventmachine/teams","hooks_url":"https://api.github.com/repos/eventmachine/eventmachine/hooks","issue_events_url":"https://api.github.com/repos/eventmachine/eventmachine/issues/events{/number}","events_url":"https://api.github.com/repos/eventmachine/eventmachine/events","assignees_url":"https://api.github.com/repos/eventmachine/eventmachine/assignees{/user}","branches_url":"https://api.github.com/repos/eventmachine/eventmachine/branches{/branch}","tags_url":"https://api.github.com/repos/eventmachine/eventmachine/tags","blobs_url":"https://api.github.com/repos/eventmachine/eventmachine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eventmachine/eventmachine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eventmachine/eventmachine/git/refs{/sha}","trees_url":"https://api.github.com/repos/eventmachine/eventmachine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eventmachine/eventmachine/statuses/{sha}","languages_url":"https://api.github.com/repos/eventmachine/eventmachine/languages","stargazers_url":"https://api.github.com/repos/eventmachine/eventmachine/stargazers","contributors_url":"https://api.github.com/repos/eventmachine/eventmachine/contributors","subscribers_url":"https://api.github.com/repos/eventmachine/eventmachine/subscribers","subscription_url":"https://api.github.com/repos/eventmachine/eventmachine/subscription","commits_url":"https://api.github.com/repos/eventmachine/eventmachine/commits{/sha}","git_commits_url":"https://api.github.com/repos/eventmachine/eventmachine/git/commits{/sha}","comments_url":"https://api.github.com/repos/eventmachine/eventmachine/comments{/number}","issue_comment_url":"https://api.github.com/repos/eventmachine/eventmachine/issues/comments{/number}","contents_url":"https://api.github.com/repos/eventmachine/eventmachine/contents/{+path}","compare_url":"https://api.github.com/repos/eventmachine/eventmachine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eventmachine/eventmachine/merges","archive_url":"https://api.github.com/repos/eventmachine/eventmachine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eventmachine/eventmachine/downloads","issues_url":"https://api.github.com/repos/eventmachine/eventmachine/issues{/number}","pulls_url":"https://api.github.com/repos/eventmachine/eventmachine/pulls{/number}","milestones_url":"https://api.github.com/repos/eventmachine/eventmachine/milestones{/number}","notifications_url":"https://api.github.com/repos/eventmachine/eventmachine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eventmachine/eventmachine/labels{/name}","releases_url":"https://api.github.com/repos/eventmachine/eventmachine/releases{/id}","deployments_url":"https://api.github.com/repos/eventmachine/eventmachine/deployments","created_at":"2008-08-17T18:35:57Z","updated_at":"2016-10-04T14:36:12Z","pushed_at":"2016-10-04T18:31:20Z","git_url":"git://github.com/eventmachine/eventmachine.git","ssh_url":"git@github.com:eventmachine/eventmachine.git","clone_url":"https://github.com/eventmachine/eventmachine.git","svn_url":"https://github.com/eventmachine/eventmachine","homepage":"http://www.rubyeventmachine.com","size":3728,"stargazers_count":3408,"watchers_count":3408,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":532,"mirror_url":null,"open_issues_count":191,"forks":532,"open_issues":191,"watchers":3408,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eventmachine/eventmachine/pulls/736"},"html":{"href":"https://github.com/eventmachine/eventmachine/pull/736"},"issue":{"href":"https://api.github.com/repos/eventmachine/eventmachine/issues/736"},"comments":{"href":"https://api.github.com/repos/eventmachine/eventmachine/issues/736/comments"},"review_comments":{"href":"https://api.github.com/repos/eventmachine/eventmachine/pulls/736/comments"},"review_comment":{"href":"https://api.github.com/repos/eventmachine/eventmachine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eventmachine/eventmachine/pulls/736/commits"},"statuses":{"href":"https://api.github.com/repos/eventmachine/eventmachine/statuses/1e62ef8c9a2de395741976280d8996c78d83df2d"}}}}
{"actor":{"display_login":"sodabrew"}}