{"action":"created","comment":{"url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/comments/181593003","pull_request_review_id":112247206,"id":181593003,"diff_hunk":"@@ -1,155 +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-        public Form1()\n-        {\n-            InitializeComponent();\n-        }\n-\n-        static IPAddress mcastAddress;\n-        static int mcastPort;\n-        \n-        \n-    \n-        XDocument doc;\n-\n-          static string Host = Dns.GetHostName();\n-   static   string IP = Dns.GetHostByName(Host).AddressList[0].ToString();\n-\n-\n-   Socket tcpSocket = new Socket(AddressFamily.InterNetwork,\n-                                   SocketType.Stream,\n-                                   ProtocolType.Tcp);\n-\n-        public void GetServerAddress()\n-        {\n-            byte[] bytes = new byte[500];\n-            mcastAddress = IPAddress.Parse(\"224.12.12.12\");\n-            mcastPort = 4000;\n-\n-\n-            Socket mcastSocket = new Socket(AddressFamily.InterNetwork,\n-                                        SocketType.Dgram,\n-                                        ProtocolType.Udp);\n-\n-            EndPoint serverEndPoint = new IPEndPoint(mcastAddress, mcastPort);\n-\n-            IPEndPoint multicastEndPoint = new IPEndPoint(mcastAddress, mcastPort);\n-           \n-             MulticastOption mcastOption = new MulticastOption(mcastAddress, IPAddress.Parse(IP));\n-\n-            mcastSocket.SetSocketOption(SocketOptionLevel.IP,\n-                                        SocketOptionName.AddMembership,\n-                                        mcastOption);\n-            \n-            mcastSocket.SendTo(Encoding.UTF8.GetBytes(IP + \":\" + mcastPort), multicastEndPoint);\n-\n-          \n-           \n-\n-            mcastSocket.ReceiveFrom(bytes, ref serverEndPoint);\n-\n-\n-            Thread.Sleep(500);\n-            tcpSocket.Connect(serverEndPoint);\n-            MessageBox.Show(serverEndPoint.ToString());\n-        \n-\n-         \n-            \n-        \n-        }\n-\n-\n-\n-\n-         void SendMessage(string message)\n-        {\n-           \n-          \n-               \n-\n-                doc = new XDocument(\n-                  new XElement(\"msg\",\n-                  new XElement(\"data\", new XAttribute(\"key\", \"Type\"), new XAttribute(\"value\", \"Send\")),\n-                  new XElement(\"data\", new XAttribute(\"key\", \"Text\"), new XAttribute(\"value\", message))));\n-\n-\n-\n-              \n-                \n-              tcpSocket.Send(Encoding.UTF8.GetBytes(doc.ToString()));\n-              \n-            \n-         \n-\n-          \n-         }\n-        delegate void Receive(string text);\n-        public void DoSmth(string text)\n-        {\n-            richTextBox1.AppendText(\"\\n\"+text);\n-\n-        }\n-\n-        private  string  ReceiveBroadcastMessages()\n-        {\n-            byte[] bytes = new byte[500];\n-        \n-            bytes = bytes.Take(tcpSocket.Receive(bytes)).ToArray();\n-            string message = Encoding.UTF8.GetString(bytes);","path":"MyClient/MyClient/Form1.cs","position":112,"original_position":112,"commit_id":"d28c9e4cf537eb6e4d37ff60f8d565d8301fe4d8","original_commit_id":"d28c9e4cf537eb6e4d37ff60f8d565d8301fe4d8","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":"Еще момент, в message у тебя будет не message который ты отправлял, а весь xml целиком. Сделай Document.Load() и достань из него message","created_at":"2018-04-15T18:53:40Z","updated_at":"2018-04-15T19:00:11Z","html_url":"https://github.com/Brainbuggged/simplechat/pull/1#discussion_r181593003","pull_request_url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/comments/181593003"},"html":{"href":"https://github.com/Brainbuggged/simplechat/pull/1#discussion_r181593003"},"pull_request":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/1"}},"in_reply_to_id":181592954},"pull_request":{"url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/1","id":181706871,"html_url":"https://github.com/Brainbuggged/simplechat/pull/1","diff_url":"https://github.com/Brainbuggged/simplechat/pull/1.diff","patch_url":"https://github.com/Brainbuggged/simplechat/pull/1.patch","issue_url":"https://api.github.com/repos/Brainbuggged/simplechat/issues/1","number":1,"state":"open","locked":false,"title":"superpuper","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},"body":"","created_at":"2018-04-15T16:12:16Z","updated_at":"2018-04-15T19:00:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"129e33b50979b1d35f7f6f45272dfe43e84fb942","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Brainbuggged/simplechat/issues/1/comments","statuses_url":"https://api.github.com/repos/Brainbuggged/simplechat/statuses/d28c9e4cf537eb6e4d37ff60f8d565d8301fe4d8","head":{"label":"Brainbuggged:master","ref":"master","sha":"d28c9e4cf537eb6e4d37ff60f8d565d8301fe4d8","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-15T16:10:15Z","pushed_at":"2018-04-15T16:12:17Z","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":14,"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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Brainbuggged:superBranch","ref":"superBranch","sha":"92422c02ae7bae7669b2021c8774fd1b34b33bef","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-15T16:10:15Z","pushed_at":"2018-04-15T16:12:17Z","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":14,"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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/1"},"html":{"href":"https://github.com/Brainbuggged/simplechat/pull/1"},"issue":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/issues/1"},"comments":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Brainbuggged/simplechat/statuses/d28c9e4cf537eb6e4d37ff60f8d565d8301fe4d8"}},"author_association":"OWNER"}}
{"actor":{"display_login":"shaykhullinsergey"}}