{"action":"created","comment":{"url":"https://api.github.com/repos/antonbobkov/potato_game/pulls/comments/226153396","pull_request_review_id":165906818,"id":226153396,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjE1MzM5Ng==","diff_hunk":"@@ -0,0 +1,58 @@\n+-module(potato_udp).\n+-behavior(gen_server).\n+\n+-export([init/1, handle_call/3, handle_cast/2, handle_info/2, code_change/3, terminate/2]).\n+\n+%% state maps {game_id} to game instance PID\n+-spec init(integer()) -> {ok, {gen_udp:socket(), map()}}.\n+init(Port) ->\n+  io:format(\"gen_udp open on port: ~p~n\", [Port]),\n+  {ok, Socket} = gen_udp:open(Port, [binary, {active,true}]),\n+  %% add to group?\n+  {ok, {Socket, maps:new()}}.\n+\n+%% Never used\n+handle_call(_E, _From, S) ->\n+  {noreply, S}.\n+\n+%% add a {game_id} => Pid to map\n+handle_cast({add_game,Key,Pid}, S) ->\n+  {Socket, Map} = S,\n+  Map2 = maps:put(Key, Pid, Map),\n+  {noreply, {Socket, Map2}};\n+","path":"src/p2p/potato_udp.erl","position":23,"original_position":23,"commit_id":"b00080cb736d3f961e8db0b55f5c8d5d8cb69981","original_commit_id":"b00080cb736d3f961e8db0b55f5c8d5d8cb69981","user":{"login":"pdlla","id":108157,"node_id":"MDQ6VXNlcjEwODE1Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/108157?v=4","gravatar_id":"","url":"https://api.github.com/users/pdlla","html_url":"https://github.com/pdlla","followers_url":"https://api.github.com/users/pdlla/followers","following_url":"https://api.github.com/users/pdlla/following{/other_user}","gists_url":"https://api.github.com/users/pdlla/gists{/gist_id}","starred_url":"https://api.github.com/users/pdlla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdlla/subscriptions","organizations_url":"https://api.github.com/users/pdlla/orgs","repos_url":"https://api.github.com/users/pdlla/repos","events_url":"https://api.github.com/users/pdlla/events{/privacy}","received_events_url":"https://api.github.com/users/pdlla/received_events","type":"User","site_admin":false},"body":":O","created_at":"2018-10-18T02:43:36Z","updated_at":"2018-10-18T02:43:37Z","html_url":"https://github.com/antonbobkov/potato_game/pull/36#discussion_r226153396","pull_request_url":"https://api.github.com/repos/antonbobkov/potato_game/pulls/36","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/antonbobkov/potato_game/pulls/comments/226153396"},"html":{"href":"https://github.com/antonbobkov/potato_game/pull/36#discussion_r226153396"},"pull_request":{"href":"https://api.github.com/repos/antonbobkov/potato_game/pulls/36"}},"in_reply_to_id":226117207},"pull_request":{"url":"https://api.github.com/repos/antonbobkov/potato_game/pulls/36","id":223448729,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzNDQ4NzI5","html_url":"https://github.com/antonbobkov/potato_game/pull/36","diff_url":"https://github.com/antonbobkov/potato_game/pull/36.diff","patch_url":"https://github.com/antonbobkov/potato_game/pull/36.patch","issue_url":"https://api.github.com/repos/antonbobkov/potato_game/issues/36","number":36,"state":"open","locked":false,"title":"potato udp hype","user":{"login":"pdlla","id":108157,"node_id":"MDQ6VXNlcjEwODE1Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/108157?v=4","gravatar_id":"","url":"https://api.github.com/users/pdlla","html_url":"https://github.com/pdlla","followers_url":"https://api.github.com/users/pdlla/followers","following_url":"https://api.github.com/users/pdlla/following{/other_user}","gists_url":"https://api.github.com/users/pdlla/gists{/gist_id}","starred_url":"https://api.github.com/users/pdlla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdlla/subscriptions","organizations_url":"https://api.github.com/users/pdlla/orgs","repos_url":"https://api.github.com/users/pdlla/repos","events_url":"https://api.github.com/users/pdlla/events{/privacy}","received_events_url":"https://api.github.com/users/pdlla/received_events","type":"User","site_admin":false},"body":"just a start on udp stuff \r\nalso removed a bunch of old stuff","created_at":"2018-10-17T02:17:55Z","updated_at":"2018-10-18T02:43:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c2bf58bb561ef53362e9a3c989f6a221dd53417","assignee":{"login":"antonbobkov","id":5906474,"node_id":"MDQ6VXNlcjU5MDY0NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5906474?v=4","gravatar_id":"","url":"https://api.github.com/users/antonbobkov","html_url":"https://github.com/antonbobkov","followers_url":"https://api.github.com/users/antonbobkov/followers","following_url":"https://api.github.com/users/antonbobkov/following{/other_user}","gists_url":"https://api.github.com/users/antonbobkov/gists{/gist_id}","starred_url":"https://api.github.com/users/antonbobkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonbobkov/subscriptions","organizations_url":"https://api.github.com/users/antonbobkov/orgs","repos_url":"https://api.github.com/users/antonbobkov/repos","events_url":"https://api.github.com/users/antonbobkov/events{/privacy}","received_events_url":"https://api.github.com/users/antonbobkov/received_events","type":"User","site_admin":false},"assignees":[{"login":"antonbobkov","id":5906474,"node_id":"MDQ6VXNlcjU5MDY0NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5906474?v=4","gravatar_id":"","url":"https://api.github.com/users/antonbobkov","html_url":"https://github.com/antonbobkov","followers_url":"https://api.github.com/users/antonbobkov/followers","following_url":"https://api.github.com/users/antonbobkov/following{/other_user}","gists_url":"https://api.github.com/users/antonbobkov/gists{/gist_id}","starred_url":"https://api.github.com/users/antonbobkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonbobkov/subscriptions","organizations_url":"https://api.github.com/users/antonbobkov/orgs","repos_url":"https://api.github.com/users/antonbobkov/repos","events_url":"https://api.github.com/users/antonbobkov/events{/privacy}","received_events_url":"https://api.github.com/users/antonbobkov/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1038487821,"node_id":"MDU6TGFiZWwxMDM4NDg3ODIx","url":"https://api.github.com/repos/antonbobkov/potato_game/labels/hype","name":"hype","color":"fffab7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/antonbobkov/potato_game/pulls/36/commits","review_comments_url":"https://api.github.com/repos/antonbobkov/potato_game/pulls/36/comments","review_comment_url":"https://api.github.com/repos/antonbobkov/potato_game/pulls/comments{/number}","comments_url":"https://api.github.com/repos/antonbobkov/potato_game/issues/36/comments","statuses_url":"https://api.github.com/repos/antonbobkov/potato_game/statuses/b00080cb736d3f961e8db0b55f5c8d5d8cb69981","head":{"label":"antonbobkov:potatoudp","ref":"potatoudp","sha":"b00080cb736d3f961e8db0b55f5c8d5d8cb69981","user":{"login":"antonbobkov","id":5906474,"node_id":"MDQ6VXNlcjU5MDY0NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5906474?v=4","gravatar_id":"","url":"https://api.github.com/users/antonbobkov","html_url":"https://github.com/antonbobkov","followers_url":"https://api.github.com/users/antonbobkov/followers","following_url":"https://api.github.com/users/antonbobkov/following{/other_user}","gists_url":"https://api.github.com/users/antonbobkov/gists{/gist_id}","starred_url":"https://api.github.com/users/antonbobkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonbobkov/subscriptions","organizations_url":"https://api.github.com/users/antonbobkov/orgs","repos_url":"https://api.github.com/users/antonbobkov/repos","events_url":"https://api.github.com/users/antonbobkov/events{/privacy}","received_events_url":"https://api.github.com/users/antonbobkov/received_events","type":"User","site_admin":false},"repo":{"id":143477769,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM0Nzc3Njk=","name":"potato_game","full_name":"antonbobkov/potato_game","private":false,"owner":{"login":"antonbobkov","id":5906474,"node_id":"MDQ6VXNlcjU5MDY0NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5906474?v=4","gravatar_id":"","url":"https://api.github.com/users/antonbobkov","html_url":"https://github.com/antonbobkov","followers_url":"https://api.github.com/users/antonbobkov/followers","following_url":"https://api.github.com/users/antonbobkov/following{/other_user}","gists_url":"https://api.github.com/users/antonbobkov/gists{/gist_id}","starred_url":"https://api.github.com/users/antonbobkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonbobkov/subscriptions","organizations_url":"https://api.github.com/users/antonbobkov/orgs","repos_url":"https://api.github.com/users/antonbobkov/repos","events_url":"https://api.github.com/users/antonbobkov/events{/privacy}","received_events_url":"https://api.github.com/users/antonbobkov/received_events","type":"User","site_admin":false},"html_url":"https://github.com/antonbobkov/potato_game","description":null,"fork":false,"url":"https://api.github.com/repos/antonbobkov/potato_game","forks_url":"https://api.github.com/repos/antonbobkov/potato_game/forks","keys_url":"https://api.github.com/repos/antonbobkov/potato_game/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antonbobkov/potato_game/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antonbobkov/potato_game/teams","hooks_url":"https://api.github.com/repos/antonbobkov/potato_game/hooks","issue_events_url":"https://api.github.com/repos/antonbobkov/potato_game/issues/events{/number}","events_url":"https://api.github.com/repos/antonbobkov/potato_game/events","assignees_url":"https://api.github.com/repos/antonbobkov/potato_game/assignees{/user}","branches_url":"https://api.github.com/repos/antonbobkov/potato_game/branches{/branch}","tags_url":"https://api.github.com/repos/antonbobkov/potato_game/tags","blobs_url":"https://api.github.com/repos/antonbobkov/potato_game/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antonbobkov/potato_game/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antonbobkov/potato_game/git/refs{/sha}","trees_url":"https://api.github.com/repos/antonbobkov/potato_game/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antonbobkov/potato_game/statuses/{sha}","languages_url":"https://api.github.com/repos/antonbobkov/potato_game/languages","stargazers_url":"https://api.github.com/repos/antonbobkov/potato_game/stargazers","contributors_url":"https://api.github.com/repos/antonbobkov/potato_game/contributors","subscribers_url":"https://api.github.com/repos/antonbobkov/potato_game/subscribers","subscription_url":"https://api.github.com/repos/antonbobkov/potato_game/subscription","commits_url":"https://api.github.com/repos/antonbobkov/potato_game/commits{/sha}","git_commits_url":"https://api.github.com/repos/antonbobkov/potato_game/git/commits{/sha}","comments_url":"https://api.github.com/repos/antonbobkov/potato_game/comments{/number}","issue_comment_url":"https://api.github.com/repos/antonbobkov/potato_game/issues/comments{/number}","contents_url":"https://api.github.com/repos/antonbobkov/potato_game/contents/{+path}","compare_url":"https://api.github.com/repos/antonbobkov/potato_game/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antonbobkov/potato_game/merges","archive_url":"https://api.github.com/repos/antonbobkov/potato_game/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antonbobkov/potato_game/downloads","issues_url":"https://api.github.com/repos/antonbobkov/potato_game/issues{/number}","pulls_url":"https://api.github.com/repos/antonbobkov/potato_game/pulls{/number}","milestones_url":"https://api.github.com/repos/antonbobkov/potato_game/milestones{/number}","notifications_url":"https://api.github.com/repos/antonbobkov/potato_game/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antonbobkov/potato_game/labels{/name}","releases_url":"https://api.github.com/repos/antonbobkov/potato_game/releases{/id}","deployments_url":"https://api.github.com/repos/antonbobkov/potato_game/deployments","created_at":"2018-08-03T22:15:41Z","updated_at":"2018-10-16T23:05:05Z","pushed_at":"2018-10-17T02:43:14Z","git_url":"git://github.com/antonbobkov/potato_game.git","ssh_url":"git@github.com:antonbobkov/potato_game.git","clone_url":"https://github.com/antonbobkov/potato_game.git","svn_url":"https://github.com/antonbobkov/potato_game","homepage":null,"size":214,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"antonbobkov:master","ref":"master","sha":"44bb74cc8ad3067688db9abe4b9e3d37fa5264c4","user":{"login":"antonbobkov","id":5906474,"node_id":"MDQ6VXNlcjU5MDY0NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5906474?v=4","gravatar_id":"","url":"https://api.github.com/users/antonbobkov","html_url":"https://github.com/antonbobkov","followers_url":"https://api.github.com/users/antonbobkov/followers","following_url":"https://api.github.com/users/antonbobkov/following{/other_user}","gists_url":"https://api.github.com/users/antonbobkov/gists{/gist_id}","starred_url":"https://api.github.com/users/antonbobkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonbobkov/subscriptions","organizations_url":"https://api.github.com/users/antonbobkov/orgs","repos_url":"https://api.github.com/users/antonbobkov/repos","events_url":"https://api.github.com/users/antonbobkov/events{/privacy}","received_events_url":"https://api.github.com/users/antonbobkov/received_events","type":"User","site_admin":false},"repo":{"id":143477769,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM0Nzc3Njk=","name":"potato_game","full_name":"antonbobkov/potato_game","private":false,"owner":{"login":"antonbobkov","id":5906474,"node_id":"MDQ6VXNlcjU5MDY0NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5906474?v=4","gravatar_id":"","url":"https://api.github.com/users/antonbobkov","html_url":"https://github.com/antonbobkov","followers_url":"https://api.github.com/users/antonbobkov/followers","following_url":"https://api.github.com/users/antonbobkov/following{/other_user}","gists_url":"https://api.github.com/users/antonbobkov/gists{/gist_id}","starred_url":"https://api.github.com/users/antonbobkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonbobkov/subscriptions","organizations_url":"https://api.github.com/users/antonbobkov/orgs","repos_url":"https://api.github.com/users/antonbobkov/repos","events_url":"https://api.github.com/users/antonbobkov/events{/privacy}","received_events_url":"https://api.github.com/users/antonbobkov/received_events","type":"User","site_admin":false},"html_url":"https://github.com/antonbobkov/potato_game","description":null,"fork":false,"url":"https://api.github.com/repos/antonbobkov/potato_game","forks_url":"https://api.github.com/repos/antonbobkov/potato_game/forks","keys_url":"https://api.github.com/repos/antonbobkov/potato_game/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antonbobkov/potato_game/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antonbobkov/potato_game/teams","hooks_url":"https://api.github.com/repos/antonbobkov/potato_game/hooks","issue_events_url":"https://api.github.com/repos/antonbobkov/potato_game/issues/events{/number}","events_url":"https://api.github.com/repos/antonbobkov/potato_game/events","assignees_url":"https://api.github.com/repos/antonbobkov/potato_game/assignees{/user}","branches_url":"https://api.github.com/repos/antonbobkov/potato_game/branches{/branch}","tags_url":"https://api.github.com/repos/antonbobkov/potato_game/tags","blobs_url":"https://api.github.com/repos/antonbobkov/potato_game/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antonbobkov/potato_game/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antonbobkov/potato_game/git/refs{/sha}","trees_url":"https://api.github.com/repos/antonbobkov/potato_game/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antonbobkov/potato_game/statuses/{sha}","languages_url":"https://api.github.com/repos/antonbobkov/potato_game/languages","stargazers_url":"https://api.github.com/repos/antonbobkov/potato_game/stargazers","contributors_url":"https://api.github.com/repos/antonbobkov/potato_game/contributors","subscribers_url":"https://api.github.com/repos/antonbobkov/potato_game/subscribers","subscription_url":"https://api.github.com/repos/antonbobkov/potato_game/subscription","commits_url":"https://api.github.com/repos/antonbobkov/potato_game/commits{/sha}","git_commits_url":"https://api.github.com/repos/antonbobkov/potato_game/git/commits{/sha}","comments_url":"https://api.github.com/repos/antonbobkov/potato_game/comments{/number}","issue_comment_url":"https://api.github.com/repos/antonbobkov/potato_game/issues/comments{/number}","contents_url":"https://api.github.com/repos/antonbobkov/potato_game/contents/{+path}","compare_url":"https://api.github.com/repos/antonbobkov/potato_game/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antonbobkov/potato_game/merges","archive_url":"https://api.github.com/repos/antonbobkov/potato_game/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antonbobkov/potato_game/downloads","issues_url":"https://api.github.com/repos/antonbobkov/potato_game/issues{/number}","pulls_url":"https://api.github.com/repos/antonbobkov/potato_game/pulls{/number}","milestones_url":"https://api.github.com/repos/antonbobkov/potato_game/milestones{/number}","notifications_url":"https://api.github.com/repos/antonbobkov/potato_game/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antonbobkov/potato_game/labels{/name}","releases_url":"https://api.github.com/repos/antonbobkov/potato_game/releases{/id}","deployments_url":"https://api.github.com/repos/antonbobkov/potato_game/deployments","created_at":"2018-08-03T22:15:41Z","updated_at":"2018-10-16T23:05:05Z","pushed_at":"2018-10-17T02:43:14Z","git_url":"git://github.com/antonbobkov/potato_game.git","ssh_url":"git@github.com:antonbobkov/potato_game.git","clone_url":"https://github.com/antonbobkov/potato_game.git","svn_url":"https://github.com/antonbobkov/potato_game","homepage":null,"size":214,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/antonbobkov/potato_game/pulls/36"},"html":{"href":"https://github.com/antonbobkov/potato_game/pull/36"},"issue":{"href":"https://api.github.com/repos/antonbobkov/potato_game/issues/36"},"comments":{"href":"https://api.github.com/repos/antonbobkov/potato_game/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/antonbobkov/potato_game/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/antonbobkov/potato_game/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/antonbobkov/potato_game/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/antonbobkov/potato_game/statuses/b00080cb736d3f961e8db0b55f5c8d5d8cb69981"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"pdlla"}}