{"action":"created","comment":{"url":"https://api.github.com/repos/Samsung/iotjs/pulls/comments/86725795","pull_request_review_id":7368183,"id":86725795,"diff_hunk":"@@ -0,0 +1,468 @@\n+/* Copyright 2016 Samsung Electronics Co., Ltd.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+var EventEmitter = require('events').EventEmitter;\n+var util = require('util');\n+\n+var UDP = process.binding(process.binding.udp);\n+\n+var BIND_STATE_UNBOUND = 0;\n+var BIND_STATE_BINDING = 1;\n+var BIND_STATE_BOUND = 2;\n+\n+// lazily loaded\n+var dns = null;\n+\n+function lookup(address, family, callback) {\n+  if (!dns)\n+    dns = require('dns');\n+\n+  return dns.lookup(address, family, callback);\n+}\n+\n+\n+function lookup4(address, callback) {\n+  return lookup(address || '0.0.0.0', 4, callback);\n+}\n+\n+\n+function newHandle(type) {\n+  if (type == 'udp4') {\n+    var handle = new UDP();\n+    handle.lookup = lookup4;\n+    return handle;\n+  }\n+\n+  throw new Error('Bad socket type specified. Valid types are: udp4');\n+}\n+\n+\n+function Socket(type, listener) {\n+  EventEmitter.call(this);\n+\n+  if (util.isObject(type)) {\n+    var options = type;\n+    type = options.type;","path":"src/js/dgram.js","position":57,"original_position":57,"commit_id":"85129da531b7b6a93c45c5cb4985c2636cd343e7","original_commit_id":"85129da531b7b6a93c45c5cb4985c2636cd343e7","user":{"login":"zherczeg","id":2270193,"avatar_url":"https://avatars.githubusercontent.com/u/2270193?v=3","gravatar_id":"","url":"https://api.github.com/users/zherczeg","html_url":"https://github.com/zherczeg","followers_url":"https://api.github.com/users/zherczeg/followers","following_url":"https://api.github.com/users/zherczeg/following{/other_user}","gists_url":"https://api.github.com/users/zherczeg/gists{/gist_id}","starred_url":"https://api.github.com/users/zherczeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zherczeg/subscriptions","organizations_url":"https://api.github.com/users/zherczeg/orgs","repos_url":"https://api.github.com/users/zherczeg/repos","events_url":"https://api.github.com/users/zherczeg/events{/privacy}","received_events_url":"https://api.github.com/users/zherczeg/received_events","type":"User","site_admin":false},"body":"Do we need an extra value here? Why not simply:\r\n\r\n    type = type.type;","created_at":"2016-11-07T08:01:47Z","updated_at":"2016-11-07T08:01:47Z","html_url":"https://github.com/Samsung/iotjs/pull/504#discussion_r86725795","pull_request_url":"https://api.github.com/repos/Samsung/iotjs/pulls/504","_links":{"self":{"href":"https://api.github.com/repos/Samsung/iotjs/pulls/comments/86725795"},"html":{"href":"https://github.com/Samsung/iotjs/pull/504#discussion_r86725795"},"pull_request":{"href":"https://api.github.com/repos/Samsung/iotjs/pulls/504"}}},"pull_request":{"url":"https://api.github.com/repos/Samsung/iotjs/pulls/504","id":92267853,"html_url":"https://github.com/Samsung/iotjs/pull/504","diff_url":"https://github.com/Samsung/iotjs/pull/504.diff","patch_url":"https://github.com/Samsung/iotjs/pull/504.patch","issue_url":"https://api.github.com/repos/Samsung/iotjs/issues/504","number":504,"state":"open","locked":false,"title":"Implement UDP module initially","user":{"login":"chokobole","id":5644396,"avatar_url":"https://avatars.githubusercontent.com/u/5644396?v=3","gravatar_id":"","url":"https://api.github.com/users/chokobole","html_url":"https://github.com/chokobole","followers_url":"https://api.github.com/users/chokobole/followers","following_url":"https://api.github.com/users/chokobole/following{/other_user}","gists_url":"https://api.github.com/users/chokobole/gists{/gist_id}","starred_url":"https://api.github.com/users/chokobole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chokobole/subscriptions","organizations_url":"https://api.github.com/users/chokobole/orgs","repos_url":"https://api.github.com/users/chokobole/repos","events_url":"https://api.github.com/users/chokobole/events{/privacy}","received_events_url":"https://api.github.com/users/chokobole/received_events","type":"User","site_admin":false},"body":"IoT.js-DCO-1.0-Signed-off-by: wonyong.kim wonyong.kim@samsung.com","created_at":"2016-11-04T00:55:56Z","updated_at":"2016-11-07T08:01:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"305d8288e3d8e72efe9419486f0125128cba4bbc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Samsung/iotjs/pulls/504/commits","review_comments_url":"https://api.github.com/repos/Samsung/iotjs/pulls/504/comments","review_comment_url":"https://api.github.com/repos/Samsung/iotjs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Samsung/iotjs/issues/504/comments","statuses_url":"https://api.github.com/repos/Samsung/iotjs/statuses/85129da531b7b6a93c45c5cb4985c2636cd343e7","head":{"label":"chokobole:master","ref":"master","sha":"85129da531b7b6a93c45c5cb4985c2636cd343e7","user":{"login":"chokobole","id":5644396,"avatar_url":"https://avatars.githubusercontent.com/u/5644396?v=3","gravatar_id":"","url":"https://api.github.com/users/chokobole","html_url":"https://github.com/chokobole","followers_url":"https://api.github.com/users/chokobole/followers","following_url":"https://api.github.com/users/chokobole/following{/other_user}","gists_url":"https://api.github.com/users/chokobole/gists{/gist_id}","starred_url":"https://api.github.com/users/chokobole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chokobole/subscriptions","organizations_url":"https://api.github.com/users/chokobole/orgs","repos_url":"https://api.github.com/users/chokobole/repos","events_url":"https://api.github.com/users/chokobole/events{/privacy}","received_events_url":"https://api.github.com/users/chokobole/received_events","type":"User","site_admin":false},"repo":{"id":68577830,"name":"iotjs","full_name":"chokobole/iotjs","owner":{"login":"chokobole","id":5644396,"avatar_url":"https://avatars.githubusercontent.com/u/5644396?v=3","gravatar_id":"","url":"https://api.github.com/users/chokobole","html_url":"https://github.com/chokobole","followers_url":"https://api.github.com/users/chokobole/followers","following_url":"https://api.github.com/users/chokobole/following{/other_user}","gists_url":"https://api.github.com/users/chokobole/gists{/gist_id}","starred_url":"https://api.github.com/users/chokobole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chokobole/subscriptions","organizations_url":"https://api.github.com/users/chokobole/orgs","repos_url":"https://api.github.com/users/chokobole/repos","events_url":"https://api.github.com/users/chokobole/events{/privacy}","received_events_url":"https://api.github.com/users/chokobole/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chokobole/iotjs","description":"Platform for Internet of Things with JavaScript http://www.iotjs.net ","fork":true,"url":"https://api.github.com/repos/chokobole/iotjs","forks_url":"https://api.github.com/repos/chokobole/iotjs/forks","keys_url":"https://api.github.com/repos/chokobole/iotjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chokobole/iotjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chokobole/iotjs/teams","hooks_url":"https://api.github.com/repos/chokobole/iotjs/hooks","issue_events_url":"https://api.github.com/repos/chokobole/iotjs/issues/events{/number}","events_url":"https://api.github.com/repos/chokobole/iotjs/events","assignees_url":"https://api.github.com/repos/chokobole/iotjs/assignees{/user}","branches_url":"https://api.github.com/repos/chokobole/iotjs/branches{/branch}","tags_url":"https://api.github.com/repos/chokobole/iotjs/tags","blobs_url":"https://api.github.com/repos/chokobole/iotjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chokobole/iotjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chokobole/iotjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/chokobole/iotjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chokobole/iotjs/statuses/{sha}","languages_url":"https://api.github.com/repos/chokobole/iotjs/languages","stargazers_url":"https://api.github.com/repos/chokobole/iotjs/stargazers","contributors_url":"https://api.github.com/repos/chokobole/iotjs/contributors","subscribers_url":"https://api.github.com/repos/chokobole/iotjs/subscribers","subscription_url":"https://api.github.com/repos/chokobole/iotjs/subscription","commits_url":"https://api.github.com/repos/chokobole/iotjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/chokobole/iotjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/chokobole/iotjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/chokobole/iotjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/chokobole/iotjs/contents/{+path}","compare_url":"https://api.github.com/repos/chokobole/iotjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chokobole/iotjs/merges","archive_url":"https://api.github.com/repos/chokobole/iotjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chokobole/iotjs/downloads","issues_url":"https://api.github.com/repos/chokobole/iotjs/issues{/number}","pulls_url":"https://api.github.com/repos/chokobole/iotjs/pulls{/number}","milestones_url":"https://api.github.com/repos/chokobole/iotjs/milestones{/number}","notifications_url":"https://api.github.com/repos/chokobole/iotjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chokobole/iotjs/labels{/name}","releases_url":"https://api.github.com/repos/chokobole/iotjs/releases{/id}","deployments_url":"https://api.github.com/repos/chokobole/iotjs/deployments","created_at":"2016-09-19T06:56:25Z","updated_at":"2016-11-07T05:53:25Z","pushed_at":"2016-11-07T05:53:23Z","git_url":"git://github.com/chokobole/iotjs.git","ssh_url":"git@github.com:chokobole/iotjs.git","clone_url":"https://github.com/chokobole/iotjs.git","svn_url":"https://github.com/chokobole/iotjs","homepage":"","size":2019,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"Samsung:master","ref":"master","sha":"24bba4927d3e17e8eb07dd3a03810c3f67559550","user":{"login":"Samsung","id":6210390,"avatar_url":"https://avatars.githubusercontent.com/u/6210390?v=3","gravatar_id":"","url":"https://api.github.com/users/Samsung","html_url":"https://github.com/Samsung","followers_url":"https://api.github.com/users/Samsung/followers","following_url":"https://api.github.com/users/Samsung/following{/other_user}","gists_url":"https://api.github.com/users/Samsung/gists{/gist_id}","starred_url":"https://api.github.com/users/Samsung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samsung/subscriptions","organizations_url":"https://api.github.com/users/Samsung/orgs","repos_url":"https://api.github.com/users/Samsung/repos","events_url":"https://api.github.com/users/Samsung/events{/privacy}","received_events_url":"https://api.github.com/users/Samsung/received_events","type":"Organization","site_admin":false},"repo":{"id":33589470,"name":"iotjs","full_name":"Samsung/iotjs","owner":{"login":"Samsung","id":6210390,"avatar_url":"https://avatars.githubusercontent.com/u/6210390?v=3","gravatar_id":"","url":"https://api.github.com/users/Samsung","html_url":"https://github.com/Samsung","followers_url":"https://api.github.com/users/Samsung/followers","following_url":"https://api.github.com/users/Samsung/following{/other_user}","gists_url":"https://api.github.com/users/Samsung/gists{/gist_id}","starred_url":"https://api.github.com/users/Samsung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samsung/subscriptions","organizations_url":"https://api.github.com/users/Samsung/orgs","repos_url":"https://api.github.com/users/Samsung/repos","events_url":"https://api.github.com/users/Samsung/events{/privacy}","received_events_url":"https://api.github.com/users/Samsung/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Samsung/iotjs","description":"Platform for Internet of Things with JavaScript http://www.iotjs.net ","fork":false,"url":"https://api.github.com/repos/Samsung/iotjs","forks_url":"https://api.github.com/repos/Samsung/iotjs/forks","keys_url":"https://api.github.com/repos/Samsung/iotjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Samsung/iotjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Samsung/iotjs/teams","hooks_url":"https://api.github.com/repos/Samsung/iotjs/hooks","issue_events_url":"https://api.github.com/repos/Samsung/iotjs/issues/events{/number}","events_url":"https://api.github.com/repos/Samsung/iotjs/events","assignees_url":"https://api.github.com/repos/Samsung/iotjs/assignees{/user}","branches_url":"https://api.github.com/repos/Samsung/iotjs/branches{/branch}","tags_url":"https://api.github.com/repos/Samsung/iotjs/tags","blobs_url":"https://api.github.com/repos/Samsung/iotjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Samsung/iotjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Samsung/iotjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/Samsung/iotjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Samsung/iotjs/statuses/{sha}","languages_url":"https://api.github.com/repos/Samsung/iotjs/languages","stargazers_url":"https://api.github.com/repos/Samsung/iotjs/stargazers","contributors_url":"https://api.github.com/repos/Samsung/iotjs/contributors","subscribers_url":"https://api.github.com/repos/Samsung/iotjs/subscribers","subscription_url":"https://api.github.com/repos/Samsung/iotjs/subscription","commits_url":"https://api.github.com/repos/Samsung/iotjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/Samsung/iotjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/Samsung/iotjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/Samsung/iotjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/Samsung/iotjs/contents/{+path}","compare_url":"https://api.github.com/repos/Samsung/iotjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Samsung/iotjs/merges","archive_url":"https://api.github.com/repos/Samsung/iotjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Samsung/iotjs/downloads","issues_url":"https://api.github.com/repos/Samsung/iotjs/issues{/number}","pulls_url":"https://api.github.com/repos/Samsung/iotjs/pulls{/number}","milestones_url":"https://api.github.com/repos/Samsung/iotjs/milestones{/number}","notifications_url":"https://api.github.com/repos/Samsung/iotjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Samsung/iotjs/labels{/name}","releases_url":"https://api.github.com/repos/Samsung/iotjs/releases{/id}","deployments_url":"https://api.github.com/repos/Samsung/iotjs/deployments","created_at":"2015-04-08T06:41:39Z","updated_at":"2016-11-07T04:25:33Z","pushed_at":"2016-11-07T07:56:56Z","git_url":"git://github.com/Samsung/iotjs.git","ssh_url":"git@github.com:Samsung/iotjs.git","clone_url":"https://github.com/Samsung/iotjs.git","svn_url":"https://github.com/Samsung/iotjs","homepage":"","size":2263,"stargazers_count":1093,"watchers_count":1093,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":165,"mirror_url":null,"open_issues_count":29,"forks":165,"open_issues":29,"watchers":1093,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Samsung/iotjs/pulls/504"},"html":{"href":"https://github.com/Samsung/iotjs/pull/504"},"issue":{"href":"https://api.github.com/repos/Samsung/iotjs/issues/504"},"comments":{"href":"https://api.github.com/repos/Samsung/iotjs/issues/504/comments"},"review_comments":{"href":"https://api.github.com/repos/Samsung/iotjs/pulls/504/comments"},"review_comment":{"href":"https://api.github.com/repos/Samsung/iotjs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Samsung/iotjs/pulls/504/commits"},"statuses":{"href":"https://api.github.com/repos/Samsung/iotjs/statuses/85129da531b7b6a93c45c5cb4985c2636cd343e7"}}}}
{"actor":{"display_login":"zherczeg"}}