{"action":"created","comment":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/22717958","id":22717958,"diff_hunk":"@@ -0,0 +1,317 @@\n+// Copyright 2013 Dolphin Emulator Project\n+// Licensed under GPLv2\n+// Refer to the license.txt file included.\n+\n+#include \"ReliableUDPManager.h\"\n+#include \"Common/Timer.h\"\n+#include <list>\n+\n+\n+ReliableUDPManager::ReliableUDPManager(unsigned short port)\n+\t: m_listen(false)\n+\t, m_udpSocket(NULL)\n+\t, m_id(1)\n+\t, m_dropMess(0)\n+\t, m_generator((unsigned int) Common::Timer::GetTimeSinceJan1970)\n+\t, m_distribution(0.0, 1.0)\n+{\n+\tm_udpSocket = std::make_shared<sf::UdpSocket>();\n+\tif (port != 0)\n+\t{\n+\t\tm_udpSocket->bind(port);\n+\t}\n+\telse\n+\t{\n+\t\tm_udpSocket->bind(sf::Socket::AnyPort);\n+\t}\n+\tm_udpSocket->setBlocking(false);\n+\n+","path":"Source/Core/Core/ReliableUDPManager/ReliableUDPManager.cpp","position":29,"original_position":29,"commit_id":"6b0a33b0958b6708e1a8db259b004ae45d1dbdf7","original_commit_id":"6b0a33b0958b6708e1a8db259b004ae45d1dbdf7","user":{"login":"lioncash","id":712067,"avatar_url":"https://avatars.githubusercontent.com/u/712067?v=3","gravatar_id":"","url":"https://api.github.com/users/lioncash","html_url":"https://github.com/lioncash","followers_url":"https://api.github.com/users/lioncash/followers","following_url":"https://api.github.com/users/lioncash/following{/other_user}","gists_url":"https://api.github.com/users/lioncash/gists{/gist_id}","starred_url":"https://api.github.com/users/lioncash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lioncash/subscriptions","organizations_url":"https://api.github.com/users/lioncash/orgs","repos_url":"https://api.github.com/users/lioncash/repos","events_url":"https://api.github.com/users/lioncash/events{/privacy}","received_events_url":"https://api.github.com/users/lioncash/received_events","type":"User","site_admin":false},"body":"unnecessary newlines","created_at":"2015-01-09T14:29:11Z","updated_at":"2015-01-09T14:29:11Z","html_url":"https://github.com/dolphin-emu/dolphin/pull/1857#discussion_r22717958","pull_request_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/1857","_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/22717958"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/1857#discussion_r22717958"},"pull_request":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/1857"}}},"pull_request":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/1857","id":27083952,"html_url":"https://github.com/dolphin-emu/dolphin/pull/1857","diff_url":"https://github.com/dolphin-emu/dolphin/pull/1857.diff","patch_url":"https://github.com/dolphin-emu/dolphin/pull/1857.patch","issue_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/1857","number":1857,"state":"open","locked":false,"title":"Switch from TCP to UDP","user":{"login":"Ziek","id":8287045,"avatar_url":"https://avatars.githubusercontent.com/u/8287045?v=3","gravatar_id":"","url":"https://api.github.com/users/Ziek","html_url":"https://github.com/Ziek","followers_url":"https://api.github.com/users/Ziek/followers","following_url":"https://api.github.com/users/Ziek/following{/other_user}","gists_url":"https://api.github.com/users/Ziek/gists{/gist_id}","starred_url":"https://api.github.com/users/Ziek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ziek/subscriptions","organizations_url":"https://api.github.com/users/Ziek/orgs","repos_url":"https://api.github.com/users/Ziek/repos","events_url":"https://api.github.com/users/Ziek/events{/privacy}","received_events_url":"https://api.github.com/users/Ziek/received_events","type":"User","site_admin":false},"body":"This code replaces TCP with a reliable UDP protocal (based on gafferongames.com methods). This code also has a small fix to how game time is decided at start (now uses servers time and is sent out to everyone) and also has test code attached for testing different drop orders (not currently active anywhere).","created_at":"2015-01-09T07:24:58Z","updated_at":"2015-01-09T14:29:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35657409a9526cc7115a704de989662c9e5ff987","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/1857/commits","review_comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/1857/comments","review_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/{number}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/1857/comments","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/6b0a33b0958b6708e1a8db259b004ae45d1dbdf7","head":{"label":"Ziek:master","ref":"master","sha":"6b0a33b0958b6708e1a8db259b004ae45d1dbdf7","user":{"login":"Ziek","id":8287045,"avatar_url":"https://avatars.githubusercontent.com/u/8287045?v=3","gravatar_id":"","url":"https://api.github.com/users/Ziek","html_url":"https://github.com/Ziek","followers_url":"https://api.github.com/users/Ziek/followers","following_url":"https://api.github.com/users/Ziek/following{/other_user}","gists_url":"https://api.github.com/users/Ziek/gists{/gist_id}","starred_url":"https://api.github.com/users/Ziek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ziek/subscriptions","organizations_url":"https://api.github.com/users/Ziek/orgs","repos_url":"https://api.github.com/users/Ziek/repos","events_url":"https://api.github.com/users/Ziek/events{/privacy}","received_events_url":"https://api.github.com/users/Ziek/received_events","type":"User","site_admin":false},"repo":{"id":28696660,"name":"dolphin","full_name":"Ziek/dolphin","owner":{"login":"Ziek","id":8287045,"avatar_url":"https://avatars.githubusercontent.com/u/8287045?v=3","gravatar_id":"","url":"https://api.github.com/users/Ziek","html_url":"https://github.com/Ziek","followers_url":"https://api.github.com/users/Ziek/followers","following_url":"https://api.github.com/users/Ziek/following{/other_user}","gists_url":"https://api.github.com/users/Ziek/gists{/gist_id}","starred_url":"https://api.github.com/users/Ziek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ziek/subscriptions","organizations_url":"https://api.github.com/users/Ziek/orgs","repos_url":"https://api.github.com/users/Ziek/repos","events_url":"https://api.github.com/users/Ziek/events{/privacy}","received_events_url":"https://api.github.com/users/Ziek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ziek/dolphin","description":"Dolphin is a GameCube/Wii emulator, allowing you to play games for these two platforms on PC, with improvements.","fork":true,"url":"https://api.github.com/repos/Ziek/dolphin","forks_url":"https://api.github.com/repos/Ziek/dolphin/forks","keys_url":"https://api.github.com/repos/Ziek/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ziek/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ziek/dolphin/teams","hooks_url":"https://api.github.com/repos/Ziek/dolphin/hooks","issue_events_url":"https://api.github.com/repos/Ziek/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/Ziek/dolphin/events","assignees_url":"https://api.github.com/repos/Ziek/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/Ziek/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/Ziek/dolphin/tags","blobs_url":"https://api.github.com/repos/Ziek/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ziek/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ziek/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ziek/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ziek/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/Ziek/dolphin/languages","stargazers_url":"https://api.github.com/repos/Ziek/dolphin/stargazers","contributors_url":"https://api.github.com/repos/Ziek/dolphin/contributors","subscribers_url":"https://api.github.com/repos/Ziek/dolphin/subscribers","subscription_url":"https://api.github.com/repos/Ziek/dolphin/subscription","commits_url":"https://api.github.com/repos/Ziek/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ziek/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ziek/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ziek/dolphin/issues/comments/{number}","contents_url":"https://api.github.com/repos/Ziek/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/Ziek/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ziek/dolphin/merges","archive_url":"https://api.github.com/repos/Ziek/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ziek/dolphin/downloads","issues_url":"https://api.github.com/repos/Ziek/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/Ziek/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/Ziek/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/Ziek/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ziek/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/Ziek/dolphin/releases{/id}","created_at":"2015-01-01T21:53:31Z","updated_at":"2015-01-09T07:11:11Z","pushed_at":"2015-01-09T07:11:11Z","git_url":"git://github.com/Ziek/dolphin.git","ssh_url":"git@github.com:Ziek/dolphin.git","clone_url":"https://github.com/Ziek/dolphin.git","svn_url":"https://github.com/Ziek/dolphin","homepage":null,"size":197096,"stargazers_count":0,"watchers_count":0,"language":"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":"dolphin-emu:master","ref":"master","sha":"6bc274a9683bbf893ba303744148087dd0c56f2e","user":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars.githubusercontent.com/u/5050316?v=3","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":11577304,"name":"dolphin","full_name":"dolphin-emu/dolphin","owner":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars.githubusercontent.com/u/5050316?v=3","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dolphin-emu/dolphin","description":"Dolphin is a GameCube/Wii emulator, allowing you to play games for these two platforms on PC, with improvements.","fork":false,"url":"https://api.github.com/repos/dolphin-emu/dolphin","forks_url":"https://api.github.com/repos/dolphin-emu/dolphin/forks","keys_url":"https://api.github.com/repos/dolphin-emu/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dolphin-emu/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dolphin-emu/dolphin/teams","hooks_url":"https://api.github.com/repos/dolphin-emu/dolphin/hooks","issue_events_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/dolphin-emu/dolphin/events","assignees_url":"https://api.github.com/repos/dolphin-emu/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/dolphin-emu/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/tags","blobs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/dolphin-emu/dolphin/languages","stargazers_url":"https://api.github.com/repos/dolphin-emu/dolphin/stargazers","contributors_url":"https://api.github.com/repos/dolphin-emu/dolphin/contributors","subscribers_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscribers","subscription_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscription","commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/comments/{number}","contents_url":"https://api.github.com/repos/dolphin-emu/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/dolphin-emu/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dolphin-emu/dolphin/merges","archive_url":"https://api.github.com/repos/dolphin-emu/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dolphin-emu/dolphin/downloads","issues_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/dolphin-emu/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/dolphin-emu/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dolphin-emu/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/dolphin-emu/dolphin/releases{/id}","created_at":"2013-07-22T09:07:57Z","updated_at":"2015-01-09T13:56:28Z","pushed_at":"2015-01-09T13:56:28Z","git_url":"git://github.com/dolphin-emu/dolphin.git","ssh_url":"git@github.com:dolphin-emu/dolphin.git","clone_url":"https://github.com/dolphin-emu/dolphin.git","svn_url":"https://github.com/dolphin-emu/dolphin","homepage":null,"size":251644,"stargazers_count":916,"watchers_count":916,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":296,"mirror_url":null,"open_issues_count":73,"forks":296,"open_issues":73,"watchers":916,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/1857"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/1857"},"issue":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/1857"},"comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/1857/comments"},"review_comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/1857/comments"},"review_comment":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/1857/commits"},"statuses":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/6b0a33b0958b6708e1a8db259b004ae45d1dbdf7"}}}}