{"action":"created","comment":{"url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/comments/183016442","pull_request_review_id":113934710,"id":183016442,"diff_hunk":"@@ -1,174 +0,0 @@\n-﻿using System;\n-using System.Collections.Generic;\n-using System.Linq;\n-using System.Net;\n-using System.Net.Sockets;\n-using System.Text;\n-using System.Threading;\n-using System.Threading.Tasks;\n-using System.Windows.Forms;\n-using System.Xml.Linq;\n-\n-namespace MyClient\n-{\n-    public partial class Form1 : Form\n-    {\n-         Socket tcpSocket = new Socket(AddressFamily.InterNetwork,\n-                                        SocketType.Stream,\n-                                        ProtocolType.Tcp);\n-        // we need this delegate to change richTextBox and comboBox\n-        public delegate void Action<T>(string text);\n-        //get the local address of our machine\n-        string LocalAddress = Dns.GetHostEntry(Dns.GetHostName()).AddressList[0].ToString();\n-\n-        public Form1()\n-        {\n-            InitializeComponent();\n-        }\n-\n-        //we want to get  server local address \n-        public void GetServerAddress()\n-        {\n-            //buffer for the received message UPD: need to be updated every time\n-            byte[] bytes = new byte[500];\n-\n-\n-            //multicast address and port\n-            IPAddress mcastAddress = IPAddress.Parse(\"224.12.12.12\");\n-            int  mcastPort = 4000;\n-\n-            //we need multicast socket to send both  addresses between host and clients\n-            Socket mcastSocket = new Socket(AddressFamily.InterNetwork,\n-                                        SocketType.Dgram,\n-                                        ProtocolType.Udp);\n-            //things that were described at https://msdn.microsoft.com/ru-ru/library/system.net.sockets.multicastoption(v=vs.110).aspx\n-            EndPoint serverEndPoint = new IPEndPoint(mcastAddress, mcastPort);\n-            var multicastEndPoint = new IPEndPoint(mcastAddress, mcastPort);   \n-             var mcastOption = new MulticastOption(mcastAddress, IPAddress.Parse(LocalAddress));\n-            mcastSocket.SetSocketOption(SocketOptionLevel.IP,\n-                                        SocketOptionName.AddMembership,\n-                                        mcastOption);\n-            //now we want to send ANY information to the server\n-            mcastSocket.SendTo(Encoding.UTF8.GetBytes(\"Useless \"), multicastEndPoint);\n-            // we need to 'cut' the buffer(problem with zero bytes)\n-            bytes = bytes.Take(mcastSocket.ReceiveFrom(bytes, ref serverEndPoint)).ToArray();","path":"MyClient/MyClient/Form1.cs","position":54,"original_position":54,"commit_id":"ac47edaf5f176b138985d561ca9a2630ed002674","original_commit_id":"ac47edaf5f176b138985d561ca9a2630ed002674","user":{"login":"shaykhullinsergey","id":19669946,"avatar_url":"https://avatars1.githubusercontent.com/u/19669946?v=4","gravatar_id":"","url":"https://api.github.com/users/shaykhullinsergey","html_url":"https://github.com/shaykhullinsergey","followers_url":"https://api.github.com/users/shaykhullinsergey/followers","following_url":"https://api.github.com/users/shaykhullinsergey/following{/other_user}","gists_url":"https://api.github.com/users/shaykhullinsergey/gists{/gist_id}","starred_url":"https://api.github.com/users/shaykhullinsergey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaykhullinsergey/subscriptions","organizations_url":"https://api.github.com/users/shaykhullinsergey/orgs","repos_url":"https://api.github.com/users/shaykhullinsergey/repos","events_url":"https://api.github.com/users/shaykhullinsergey/events{/privacy}","received_events_url":"https://api.github.com/users/shaykhullinsergey/received_events","type":"User","site_admin":false},"body":"Вот тут пиздец, раздели на несколько строк. Разбей по понятным переменным.\r\nvar receivedBytesFromMulticast = \r\nvar takenReceivedBytes =\r\nЧто-то тип такого\r\n","created_at":"2018-04-20T11:00:51Z","updated_at":"2018-04-20T11:40:28Z","html_url":"https://github.com/Brainbuggged/simplechat/pull/2#discussion_r183016442","pull_request_url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/2","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/comments/183016442"},"html":{"href":"https://github.com/Brainbuggged/simplechat/pull/2#discussion_r183016442"},"pull_request":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/2","id":183028355,"html_url":"https://github.com/Brainbuggged/simplechat/pull/2","diff_url":"https://github.com/Brainbuggged/simplechat/pull/2.diff","patch_url":"https://github.com/Brainbuggged/simplechat/pull/2.patch","issue_url":"https://api.github.com/repos/Brainbuggged/simplechat/issues/2","number":2,"state":"open","locked":false,"title":"Fixes","user":{"login":"shaykhullinsergey","id":19669946,"avatar_url":"https://avatars1.githubusercontent.com/u/19669946?v=4","gravatar_id":"","url":"https://api.github.com/users/shaykhullinsergey","html_url":"https://github.com/shaykhullinsergey","followers_url":"https://api.github.com/users/shaykhullinsergey/followers","following_url":"https://api.github.com/users/shaykhullinsergey/following{/other_user}","gists_url":"https://api.github.com/users/shaykhullinsergey/gists{/gist_id}","starred_url":"https://api.github.com/users/shaykhullinsergey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaykhullinsergey/subscriptions","organizations_url":"https://api.github.com/users/shaykhullinsergey/orgs","repos_url":"https://api.github.com/users/shaykhullinsergey/repos","events_url":"https://api.github.com/users/shaykhullinsergey/events{/privacy}","received_events_url":"https://api.github.com/users/shaykhullinsergey/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-20T10:58:32Z","updated_at":"2018-04-20T11:40:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"642fe48d21897dc958f321ab7d05b5ea60ca4147","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/2/commits","review_comments_url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/2/comments","review_comment_url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Brainbuggged/simplechat/issues/2/comments","statuses_url":"https://api.github.com/repos/Brainbuggged/simplechat/statuses/ac47edaf5f176b138985d561ca9a2630ed002674","head":{"label":"Brainbuggged:needToFix","ref":"needToFix","sha":"ac47edaf5f176b138985d561ca9a2630ed002674","user":{"login":"Brainbuggged","id":21282672,"avatar_url":"https://avatars1.githubusercontent.com/u/21282672?v=4","gravatar_id":"","url":"https://api.github.com/users/Brainbuggged","html_url":"https://github.com/Brainbuggged","followers_url":"https://api.github.com/users/Brainbuggged/followers","following_url":"https://api.github.com/users/Brainbuggged/following{/other_user}","gists_url":"https://api.github.com/users/Brainbuggged/gists{/gist_id}","starred_url":"https://api.github.com/users/Brainbuggged/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brainbuggged/subscriptions","organizations_url":"https://api.github.com/users/Brainbuggged/orgs","repos_url":"https://api.github.com/users/Brainbuggged/repos","events_url":"https://api.github.com/users/Brainbuggged/events{/privacy}","received_events_url":"https://api.github.com/users/Brainbuggged/received_events","type":"User","site_admin":false},"repo":{"id":129626546,"name":"simplechat","full_name":"Brainbuggged/simplechat","owner":{"login":"Brainbuggged","id":21282672,"avatar_url":"https://avatars1.githubusercontent.com/u/21282672?v=4","gravatar_id":"","url":"https://api.github.com/users/Brainbuggged","html_url":"https://github.com/Brainbuggged","followers_url":"https://api.github.com/users/Brainbuggged/followers","following_url":"https://api.github.com/users/Brainbuggged/following{/other_user}","gists_url":"https://api.github.com/users/Brainbuggged/gists{/gist_id}","starred_url":"https://api.github.com/users/Brainbuggged/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brainbuggged/subscriptions","organizations_url":"https://api.github.com/users/Brainbuggged/orgs","repos_url":"https://api.github.com/users/Brainbuggged/repos","events_url":"https://api.github.com/users/Brainbuggged/events{/privacy}","received_events_url":"https://api.github.com/users/Brainbuggged/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Brainbuggged/simplechat","description":null,"fork":false,"url":"https://api.github.com/repos/Brainbuggged/simplechat","forks_url":"https://api.github.com/repos/Brainbuggged/simplechat/forks","keys_url":"https://api.github.com/repos/Brainbuggged/simplechat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Brainbuggged/simplechat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Brainbuggged/simplechat/teams","hooks_url":"https://api.github.com/repos/Brainbuggged/simplechat/hooks","issue_events_url":"https://api.github.com/repos/Brainbuggged/simplechat/issues/events{/number}","events_url":"https://api.github.com/repos/Brainbuggged/simplechat/events","assignees_url":"https://api.github.com/repos/Brainbuggged/simplechat/assignees{/user}","branches_url":"https://api.github.com/repos/Brainbuggged/simplechat/branches{/branch}","tags_url":"https://api.github.com/repos/Brainbuggged/simplechat/tags","blobs_url":"https://api.github.com/repos/Brainbuggged/simplechat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Brainbuggged/simplechat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Brainbuggged/simplechat/git/refs{/sha}","trees_url":"https://api.github.com/repos/Brainbuggged/simplechat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Brainbuggged/simplechat/statuses/{sha}","languages_url":"https://api.github.com/repos/Brainbuggged/simplechat/languages","stargazers_url":"https://api.github.com/repos/Brainbuggged/simplechat/stargazers","contributors_url":"https://api.github.com/repos/Brainbuggged/simplechat/contributors","subscribers_url":"https://api.github.com/repos/Brainbuggged/simplechat/subscribers","subscription_url":"https://api.github.com/repos/Brainbuggged/simplechat/subscription","commits_url":"https://api.github.com/repos/Brainbuggged/simplechat/commits{/sha}","git_commits_url":"https://api.github.com/repos/Brainbuggged/simplechat/git/commits{/sha}","comments_url":"https://api.github.com/repos/Brainbuggged/simplechat/comments{/number}","issue_comment_url":"https://api.github.com/repos/Brainbuggged/simplechat/issues/comments{/number}","contents_url":"https://api.github.com/repos/Brainbuggged/simplechat/contents/{+path}","compare_url":"https://api.github.com/repos/Brainbuggged/simplechat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Brainbuggged/simplechat/merges","archive_url":"https://api.github.com/repos/Brainbuggged/simplechat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Brainbuggged/simplechat/downloads","issues_url":"https://api.github.com/repos/Brainbuggged/simplechat/issues{/number}","pulls_url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls{/number}","milestones_url":"https://api.github.com/repos/Brainbuggged/simplechat/milestones{/number}","notifications_url":"https://api.github.com/repos/Brainbuggged/simplechat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Brainbuggged/simplechat/labels{/name}","releases_url":"https://api.github.com/repos/Brainbuggged/simplechat/releases{/id}","deployments_url":"https://api.github.com/repos/Brainbuggged/simplechat/deployments","created_at":"2018-04-15T16:01:16Z","updated_at":"2018-04-20T09:26:55Z","pushed_at":"2018-04-20T10:58:32Z","git_url":"git://github.com/Brainbuggged/simplechat.git","ssh_url":"git@github.com:Brainbuggged/simplechat.git","clone_url":"https://github.com/Brainbuggged/simplechat.git","svn_url":"https://github.com/Brainbuggged/simplechat","homepage":null,"size":23,"stargazers_count":0,"watchers_count":0,"language":"C#","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":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Brainbuggged:master","ref":"master","sha":"19c5e54940fa2b18c8e32a4a135add0268b363ce","user":{"login":"Brainbuggged","id":21282672,"avatar_url":"https://avatars1.githubusercontent.com/u/21282672?v=4","gravatar_id":"","url":"https://api.github.com/users/Brainbuggged","html_url":"https://github.com/Brainbuggged","followers_url":"https://api.github.com/users/Brainbuggged/followers","following_url":"https://api.github.com/users/Brainbuggged/following{/other_user}","gists_url":"https://api.github.com/users/Brainbuggged/gists{/gist_id}","starred_url":"https://api.github.com/users/Brainbuggged/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brainbuggged/subscriptions","organizations_url":"https://api.github.com/users/Brainbuggged/orgs","repos_url":"https://api.github.com/users/Brainbuggged/repos","events_url":"https://api.github.com/users/Brainbuggged/events{/privacy}","received_events_url":"https://api.github.com/users/Brainbuggged/received_events","type":"User","site_admin":false},"repo":{"id":129626546,"name":"simplechat","full_name":"Brainbuggged/simplechat","owner":{"login":"Brainbuggged","id":21282672,"avatar_url":"https://avatars1.githubusercontent.com/u/21282672?v=4","gravatar_id":"","url":"https://api.github.com/users/Brainbuggged","html_url":"https://github.com/Brainbuggged","followers_url":"https://api.github.com/users/Brainbuggged/followers","following_url":"https://api.github.com/users/Brainbuggged/following{/other_user}","gists_url":"https://api.github.com/users/Brainbuggged/gists{/gist_id}","starred_url":"https://api.github.com/users/Brainbuggged/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brainbuggged/subscriptions","organizations_url":"https://api.github.com/users/Brainbuggged/orgs","repos_url":"https://api.github.com/users/Brainbuggged/repos","events_url":"https://api.github.com/users/Brainbuggged/events{/privacy}","received_events_url":"https://api.github.com/users/Brainbuggged/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Brainbuggged/simplechat","description":null,"fork":false,"url":"https://api.github.com/repos/Brainbuggged/simplechat","forks_url":"https://api.github.com/repos/Brainbuggged/simplechat/forks","keys_url":"https://api.github.com/repos/Brainbuggged/simplechat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Brainbuggged/simplechat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Brainbuggged/simplechat/teams","hooks_url":"https://api.github.com/repos/Brainbuggged/simplechat/hooks","issue_events_url":"https://api.github.com/repos/Brainbuggged/simplechat/issues/events{/number}","events_url":"https://api.github.com/repos/Brainbuggged/simplechat/events","assignees_url":"https://api.github.com/repos/Brainbuggged/simplechat/assignees{/user}","branches_url":"https://api.github.com/repos/Brainbuggged/simplechat/branches{/branch}","tags_url":"https://api.github.com/repos/Brainbuggged/simplechat/tags","blobs_url":"https://api.github.com/repos/Brainbuggged/simplechat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Brainbuggged/simplechat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Brainbuggged/simplechat/git/refs{/sha}","trees_url":"https://api.github.com/repos/Brainbuggged/simplechat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Brainbuggged/simplechat/statuses/{sha}","languages_url":"https://api.github.com/repos/Brainbuggged/simplechat/languages","stargazers_url":"https://api.github.com/repos/Brainbuggged/simplechat/stargazers","contributors_url":"https://api.github.com/repos/Brainbuggged/simplechat/contributors","subscribers_url":"https://api.github.com/repos/Brainbuggged/simplechat/subscribers","subscription_url":"https://api.github.com/repos/Brainbuggged/simplechat/subscription","commits_url":"https://api.github.com/repos/Brainbuggged/simplechat/commits{/sha}","git_commits_url":"https://api.github.com/repos/Brainbuggged/simplechat/git/commits{/sha}","comments_url":"https://api.github.com/repos/Brainbuggged/simplechat/comments{/number}","issue_comment_url":"https://api.github.com/repos/Brainbuggged/simplechat/issues/comments{/number}","contents_url":"https://api.github.com/repos/Brainbuggged/simplechat/contents/{+path}","compare_url":"https://api.github.com/repos/Brainbuggged/simplechat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Brainbuggged/simplechat/merges","archive_url":"https://api.github.com/repos/Brainbuggged/simplechat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Brainbuggged/simplechat/downloads","issues_url":"https://api.github.com/repos/Brainbuggged/simplechat/issues{/number}","pulls_url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls{/number}","milestones_url":"https://api.github.com/repos/Brainbuggged/simplechat/milestones{/number}","notifications_url":"https://api.github.com/repos/Brainbuggged/simplechat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Brainbuggged/simplechat/labels{/name}","releases_url":"https://api.github.com/repos/Brainbuggged/simplechat/releases{/id}","deployments_url":"https://api.github.com/repos/Brainbuggged/simplechat/deployments","created_at":"2018-04-15T16:01:16Z","updated_at":"2018-04-20T09:26:55Z","pushed_at":"2018-04-20T10:58:32Z","git_url":"git://github.com/Brainbuggged/simplechat.git","ssh_url":"git@github.com:Brainbuggged/simplechat.git","clone_url":"https://github.com/Brainbuggged/simplechat.git","svn_url":"https://github.com/Brainbuggged/simplechat","homepage":null,"size":23,"stargazers_count":0,"watchers_count":0,"language":"C#","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":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/2"},"html":{"href":"https://github.com/Brainbuggged/simplechat/pull/2"},"issue":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/issues/2"},"comments":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/statuses/ac47edaf5f176b138985d561ca9a2630ed002674"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"shaykhullinsergey"}}