{"action":"created","comment":{"url":"https://api.github.com/repos/tradle/react-native-udp/pulls/comments/35794301","id":35794301,"diff_hunk":"@@ -82,6 +82,20 @@ @implementation UdpSockets\n     if (callback) callback(@[]);\n }\n \n+RCT_EXPORT_METHOD(setBroadcast:(NSString*)cId\n+                  flag:(BOOL)flag\n+                  callback:(RCTResponseSenderBlock)callback) {\n+    UdpSocketClient* client = [self findClient:cId callback:callback];\n+    if (!client) return;\n+\n+    NSError *error = nil;\n+    if (![client setBroadcast:flag error:&error])\n+    {\n+        callback(@[error]);","path":"UdpSockets.m","position":13,"original_position":13,"commit_id":"c1b8872fa4425633b26d4caacb387b83e91c33fe","original_commit_id":"569b0b8253b6293893c6025d49097b32a7bbb582","user":{"login":"mvayngrib","id":83948,"avatar_url":"https://avatars.githubusercontent.com/u/83948?v=3","gravatar_id":"","url":"https://api.github.com/users/mvayngrib","html_url":"https://github.com/mvayngrib","followers_url":"https://api.github.com/users/mvayngrib/followers","following_url":"https://api.github.com/users/mvayngrib/following{/other_user}","gists_url":"https://api.github.com/users/mvayngrib/gists{/gist_id}","starred_url":"https://api.github.com/users/mvayngrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvayngrib/subscriptions","organizations_url":"https://api.github.com/users/mvayngrib/orgs","repos_url":"https://api.github.com/users/mvayngrib/repos","events_url":"https://api.github.com/users/mvayngrib/events{/privacy}","received_events_url":"https://api.github.com/users/mvayngrib/received_events","type":"User","site_admin":false},"body":"makes sense, node dgram sockets also throw an error on setBroadcast before bind. \r\n\r\nWould you mind making that explicit? Like checking if this._state === STATE.UNBOUND and throwing an error, something like \"you must bind before setBroadcast\". Because that red box error is pretty inscrutable","created_at":"2015-07-29T18:26:40Z","updated_at":"2015-07-29T18:26:40Z","html_url":"https://github.com/tradle/react-native-udp/pull/5#discussion_r35794301","pull_request_url":"https://api.github.com/repos/tradle/react-native-udp/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/tradle/react-native-udp/pulls/comments/35794301"},"html":{"href":"https://github.com/tradle/react-native-udp/pull/5#discussion_r35794301"},"pull_request":{"href":"https://api.github.com/repos/tradle/react-native-udp/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/tradle/react-native-udp/pulls/5","id":41149549,"html_url":"https://github.com/tradle/react-native-udp/pull/5","diff_url":"https://github.com/tradle/react-native-udp/pull/5.diff","patch_url":"https://github.com/tradle/react-native-udp/pull/5.patch","issue_url":"https://api.github.com/repos/tradle/react-native-udp/issues/5","number":5,"state":"open","locked":false,"title":"Implement setBroadcast()","user":{"login":"yesmeck","id":465125,"avatar_url":"https://avatars.githubusercontent.com/u/465125?v=3","gravatar_id":"","url":"https://api.github.com/users/yesmeck","html_url":"https://github.com/yesmeck","followers_url":"https://api.github.com/users/yesmeck/followers","following_url":"https://api.github.com/users/yesmeck/following{/other_user}","gists_url":"https://api.github.com/users/yesmeck/gists{/gist_id}","starred_url":"https://api.github.com/users/yesmeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yesmeck/subscriptions","organizations_url":"https://api.github.com/users/yesmeck/orgs","repos_url":"https://api.github.com/users/yesmeck/repos","events_url":"https://api.github.com/users/yesmeck/events{/privacy}","received_events_url":"https://api.github.com/users/yesmeck/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-29T17:26:29Z","updated_at":"2015-07-29T18:26:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4ec35f7b221aac5ec788efebf105fd331dd338d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tradle/react-native-udp/pulls/5/commits","review_comments_url":"https://api.github.com/repos/tradle/react-native-udp/pulls/5/comments","review_comment_url":"https://api.github.com/repos/tradle/react-native-udp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tradle/react-native-udp/issues/5/comments","statuses_url":"https://api.github.com/repos/tradle/react-native-udp/statuses/c1b8872fa4425633b26d4caacb387b83e91c33fe","head":{"label":"yesmeck:master","ref":"master","sha":"c1b8872fa4425633b26d4caacb387b83e91c33fe","user":{"login":"yesmeck","id":465125,"avatar_url":"https://avatars.githubusercontent.com/u/465125?v=3","gravatar_id":"","url":"https://api.github.com/users/yesmeck","html_url":"https://github.com/yesmeck","followers_url":"https://api.github.com/users/yesmeck/followers","following_url":"https://api.github.com/users/yesmeck/following{/other_user}","gists_url":"https://api.github.com/users/yesmeck/gists{/gist_id}","starred_url":"https://api.github.com/users/yesmeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yesmeck/subscriptions","organizations_url":"https://api.github.com/users/yesmeck/orgs","repos_url":"https://api.github.com/users/yesmeck/repos","events_url":"https://api.github.com/users/yesmeck/events{/privacy}","received_events_url":"https://api.github.com/users/yesmeck/received_events","type":"User","site_admin":false},"repo":{"id":39903421,"name":"react-native-udp","full_name":"yesmeck/react-native-udp","owner":{"login":"yesmeck","id":465125,"avatar_url":"https://avatars.githubusercontent.com/u/465125?v=3","gravatar_id":"","url":"https://api.github.com/users/yesmeck","html_url":"https://github.com/yesmeck","followers_url":"https://api.github.com/users/yesmeck/followers","following_url":"https://api.github.com/users/yesmeck/following{/other_user}","gists_url":"https://api.github.com/users/yesmeck/gists{/gist_id}","starred_url":"https://api.github.com/users/yesmeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yesmeck/subscriptions","organizations_url":"https://api.github.com/users/yesmeck/orgs","repos_url":"https://api.github.com/users/yesmeck/repos","events_url":"https://api.github.com/users/yesmeck/events{/privacy}","received_events_url":"https://api.github.com/users/yesmeck/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yesmeck/react-native-udp","description":"node's dgram for react-native","fork":true,"url":"https://api.github.com/repos/yesmeck/react-native-udp","forks_url":"https://api.github.com/repos/yesmeck/react-native-udp/forks","keys_url":"https://api.github.com/repos/yesmeck/react-native-udp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yesmeck/react-native-udp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yesmeck/react-native-udp/teams","hooks_url":"https://api.github.com/repos/yesmeck/react-native-udp/hooks","issue_events_url":"https://api.github.com/repos/yesmeck/react-native-udp/issues/events{/number}","events_url":"https://api.github.com/repos/yesmeck/react-native-udp/events","assignees_url":"https://api.github.com/repos/yesmeck/react-native-udp/assignees{/user}","branches_url":"https://api.github.com/repos/yesmeck/react-native-udp/branches{/branch}","tags_url":"https://api.github.com/repos/yesmeck/react-native-udp/tags","blobs_url":"https://api.github.com/repos/yesmeck/react-native-udp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yesmeck/react-native-udp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yesmeck/react-native-udp/git/refs{/sha}","trees_url":"https://api.github.com/repos/yesmeck/react-native-udp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yesmeck/react-native-udp/statuses/{sha}","languages_url":"https://api.github.com/repos/yesmeck/react-native-udp/languages","stargazers_url":"https://api.github.com/repos/yesmeck/react-native-udp/stargazers","contributors_url":"https://api.github.com/repos/yesmeck/react-native-udp/contributors","subscribers_url":"https://api.github.com/repos/yesmeck/react-native-udp/subscribers","subscription_url":"https://api.github.com/repos/yesmeck/react-native-udp/subscription","commits_url":"https://api.github.com/repos/yesmeck/react-native-udp/commits{/sha}","git_commits_url":"https://api.github.com/repos/yesmeck/react-native-udp/git/commits{/sha}","comments_url":"https://api.github.com/repos/yesmeck/react-native-udp/comments{/number}","issue_comment_url":"https://api.github.com/repos/yesmeck/react-native-udp/issues/comments{/number}","contents_url":"https://api.github.com/repos/yesmeck/react-native-udp/contents/{+path}","compare_url":"https://api.github.com/repos/yesmeck/react-native-udp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yesmeck/react-native-udp/merges","archive_url":"https://api.github.com/repos/yesmeck/react-native-udp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yesmeck/react-native-udp/downloads","issues_url":"https://api.github.com/repos/yesmeck/react-native-udp/issues{/number}","pulls_url":"https://api.github.com/repos/yesmeck/react-native-udp/pulls{/number}","milestones_url":"https://api.github.com/repos/yesmeck/react-native-udp/milestones{/number}","notifications_url":"https://api.github.com/repos/yesmeck/react-native-udp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yesmeck/react-native-udp/labels{/name}","releases_url":"https://api.github.com/repos/yesmeck/react-native-udp/releases{/id}","created_at":"2015-07-29T16:13:40Z","updated_at":"2015-07-29T16:13:41Z","pushed_at":"2015-07-29T18:18:28Z","git_url":"git://github.com/yesmeck/react-native-udp.git","ssh_url":"git@github.com:yesmeck/react-native-udp.git","clone_url":"https://github.com/yesmeck/react-native-udp.git","svn_url":"https://github.com/yesmeck/react-native-udp","homepage":null,"size":358,"stargazers_count":0,"watchers_count":0,"language":"Objective-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":"tradle:master","ref":"master","sha":"e984ef88598b951f6a39a3e663380a53ab39cd96","user":{"login":"tradle","id":9482126,"avatar_url":"https://avatars.githubusercontent.com/u/9482126?v=3","gravatar_id":"","url":"https://api.github.com/users/tradle","html_url":"https://github.com/tradle","followers_url":"https://api.github.com/users/tradle/followers","following_url":"https://api.github.com/users/tradle/following{/other_user}","gists_url":"https://api.github.com/users/tradle/gists{/gist_id}","starred_url":"https://api.github.com/users/tradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tradle/subscriptions","organizations_url":"https://api.github.com/users/tradle/orgs","repos_url":"https://api.github.com/users/tradle/repos","events_url":"https://api.github.com/users/tradle/events{/privacy}","received_events_url":"https://api.github.com/users/tradle/received_events","type":"Organization","site_admin":false},"repo":{"id":35346949,"name":"react-native-udp","full_name":"tradle/react-native-udp","owner":{"login":"tradle","id":9482126,"avatar_url":"https://avatars.githubusercontent.com/u/9482126?v=3","gravatar_id":"","url":"https://api.github.com/users/tradle","html_url":"https://github.com/tradle","followers_url":"https://api.github.com/users/tradle/followers","following_url":"https://api.github.com/users/tradle/following{/other_user}","gists_url":"https://api.github.com/users/tradle/gists{/gist_id}","starred_url":"https://api.github.com/users/tradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tradle/subscriptions","organizations_url":"https://api.github.com/users/tradle/orgs","repos_url":"https://api.github.com/users/tradle/repos","events_url":"https://api.github.com/users/tradle/events{/privacy}","received_events_url":"https://api.github.com/users/tradle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tradle/react-native-udp","description":"node's dgram for react-native","fork":false,"url":"https://api.github.com/repos/tradle/react-native-udp","forks_url":"https://api.github.com/repos/tradle/react-native-udp/forks","keys_url":"https://api.github.com/repos/tradle/react-native-udp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tradle/react-native-udp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tradle/react-native-udp/teams","hooks_url":"https://api.github.com/repos/tradle/react-native-udp/hooks","issue_events_url":"https://api.github.com/repos/tradle/react-native-udp/issues/events{/number}","events_url":"https://api.github.com/repos/tradle/react-native-udp/events","assignees_url":"https://api.github.com/repos/tradle/react-native-udp/assignees{/user}","branches_url":"https://api.github.com/repos/tradle/react-native-udp/branches{/branch}","tags_url":"https://api.github.com/repos/tradle/react-native-udp/tags","blobs_url":"https://api.github.com/repos/tradle/react-native-udp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tradle/react-native-udp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tradle/react-native-udp/git/refs{/sha}","trees_url":"https://api.github.com/repos/tradle/react-native-udp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tradle/react-native-udp/statuses/{sha}","languages_url":"https://api.github.com/repos/tradle/react-native-udp/languages","stargazers_url":"https://api.github.com/repos/tradle/react-native-udp/stargazers","contributors_url":"https://api.github.com/repos/tradle/react-native-udp/contributors","subscribers_url":"https://api.github.com/repos/tradle/react-native-udp/subscribers","subscription_url":"https://api.github.com/repos/tradle/react-native-udp/subscription","commits_url":"https://api.github.com/repos/tradle/react-native-udp/commits{/sha}","git_commits_url":"https://api.github.com/repos/tradle/react-native-udp/git/commits{/sha}","comments_url":"https://api.github.com/repos/tradle/react-native-udp/comments{/number}","issue_comment_url":"https://api.github.com/repos/tradle/react-native-udp/issues/comments{/number}","contents_url":"https://api.github.com/repos/tradle/react-native-udp/contents/{+path}","compare_url":"https://api.github.com/repos/tradle/react-native-udp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tradle/react-native-udp/merges","archive_url":"https://api.github.com/repos/tradle/react-native-udp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tradle/react-native-udp/downloads","issues_url":"https://api.github.com/repos/tradle/react-native-udp/issues{/number}","pulls_url":"https://api.github.com/repos/tradle/react-native-udp/pulls{/number}","milestones_url":"https://api.github.com/repos/tradle/react-native-udp/milestones{/number}","notifications_url":"https://api.github.com/repos/tradle/react-native-udp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tradle/react-native-udp/labels{/name}","releases_url":"https://api.github.com/repos/tradle/react-native-udp/releases{/id}","created_at":"2015-05-09T21:55:48Z","updated_at":"2015-07-24T19:25:57Z","pushed_at":"2015-07-29T18:18:29Z","git_url":"git://github.com/tradle/react-native-udp.git","ssh_url":"git@github.com:tradle/react-native-udp.git","clone_url":"https://github.com/tradle/react-native-udp.git","svn_url":"https://github.com/tradle/react-native-udp","homepage":null,"size":358,"stargazers_count":13,"watchers_count":13,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tradle/react-native-udp/pulls/5"},"html":{"href":"https://github.com/tradle/react-native-udp/pull/5"},"issue":{"href":"https://api.github.com/repos/tradle/react-native-udp/issues/5"},"comments":{"href":"https://api.github.com/repos/tradle/react-native-udp/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/tradle/react-native-udp/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/tradle/react-native-udp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tradle/react-native-udp/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/tradle/react-native-udp/statuses/c1b8872fa4425633b26d4caacb387b83e91c33fe"}}}}