{"action":"created","comment":{"url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls/comments/51691058","id":51691058,"diff_hunk":"@@ -0,0 +1,37 @@\n+package com.clouway.conversation.server;\n+\n+import java.io.IOException;\n+import java.io.PrintWriter;\n+import java.net.ServerSocket;\n+import java.net.Socket;\n+import java.text.SimpleDateFormat;\n+import java.util.Calendar;\n+import java.util.Date;\n+\n+/**\n+ * @author Krasimir Raikov(raikov.krasimir@gmail.com)\n+ */\n+public class Server {\n+\n+    private Calendar calendar;\n+\n+    public Server(Calendar calendar) {\n+        this.calendar=calendar;\n+    }\n+\n+    public void run(int portNumber) {\n+        try {\n+            ServerSocket serverSocket = new ServerSocket(portNumber);\n+            Socket clientSocket = serverSocket.accept();\n+            PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);\n+            SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n+            out.println(\"Hello! \" + format.format(calendar.getTime()));\n+        } catch (IOException e) {\n+            e.printStackTrace();\n+        }\n+    }\n+\n+    public void date(Date date) {","path":"src/com/clouway/conversation/server/Server.java","position":34,"original_position":34,"commit_id":"bd63ab1374e2dd4989fd55f30cffcda7f7940169","original_commit_id":"bd63ab1374e2dd4989fd55f30cffcda7f7940169","user":{"login":"KrasimirRaikov","id":13517204,"avatar_url":"https://avatars.githubusercontent.com/u/13517204?v=3","gravatar_id":"","url":"https://api.github.com/users/KrasimirRaikov","html_url":"https://github.com/KrasimirRaikov","followers_url":"https://api.github.com/users/KrasimirRaikov/followers","following_url":"https://api.github.com/users/KrasimirRaikov/following{/other_user}","gists_url":"https://api.github.com/users/KrasimirRaikov/gists{/gist_id}","starred_url":"https://api.github.com/users/KrasimirRaikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrasimirRaikov/subscriptions","organizations_url":"https://api.github.com/users/KrasimirRaikov/orgs","repos_url":"https://api.github.com/users/KrasimirRaikov/repos","events_url":"https://api.github.com/users/KrasimirRaikov/events{/privacy}","received_events_url":"https://api.github.com/users/KrasimirRaikov/received_events","type":"User","site_admin":false},"body":"I thought maybe to make a class Time, Date or Clock which would have a reference to the server and update the time through it's date(Date date) method. Would that work?","created_at":"2016-02-03T08:28:16Z","updated_at":"2016-02-03T08:28:16Z","html_url":"https://github.com/clouway-incubator/networking-and-gui/pull/10#discussion_r51691058","pull_request_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls/comments/51691058"},"html":{"href":"https://github.com/clouway-incubator/networking-and-gui/pull/10#discussion_r51691058"},"pull_request":{"href":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls/10","id":58095930,"html_url":"https://github.com/clouway-incubator/networking-and-gui/pull/10","diff_url":"https://github.com/clouway-incubator/networking-and-gui/pull/10.diff","patch_url":"https://github.com/clouway-incubator/networking-and-gui/pull/10.patch","issue_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/issues/10","number":10,"state":"open","locked":false,"title":"second task, conversation between server and client","user":{"login":"KrasimirRaikov","id":13517204,"avatar_url":"https://avatars.githubusercontent.com/u/13517204?v=3","gravatar_id":"","url":"https://api.github.com/users/KrasimirRaikov","html_url":"https://github.com/KrasimirRaikov","followers_url":"https://api.github.com/users/KrasimirRaikov/followers","following_url":"https://api.github.com/users/KrasimirRaikov/following{/other_user}","gists_url":"https://api.github.com/users/KrasimirRaikov/gists{/gist_id}","starred_url":"https://api.github.com/users/KrasimirRaikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrasimirRaikov/subscriptions","organizations_url":"https://api.github.com/users/KrasimirRaikov/orgs","repos_url":"https://api.github.com/users/KrasimirRaikov/repos","events_url":"https://api.github.com/users/KrasimirRaikov/events{/privacy}","received_events_url":"https://api.github.com/users/KrasimirRaikov/received_events","type":"User","site_admin":false},"body":"When the client connects to the server, the server sends it message\r\n\"Hello! \"+ system date.","created_at":"2016-02-03T06:16:19Z","updated_at":"2016-02-03T08:28:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df3d704dcf4354c5ff15d5aa582d316180769724","assignee":{"login":"mgenov","id":209223,"avatar_url":"https://avatars.githubusercontent.com/u/209223?v=3","gravatar_id":"","url":"https://api.github.com/users/mgenov","html_url":"https://github.com/mgenov","followers_url":"https://api.github.com/users/mgenov/followers","following_url":"https://api.github.com/users/mgenov/following{/other_user}","gists_url":"https://api.github.com/users/mgenov/gists{/gist_id}","starred_url":"https://api.github.com/users/mgenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgenov/subscriptions","organizations_url":"https://api.github.com/users/mgenov/orgs","repos_url":"https://api.github.com/users/mgenov/repos","events_url":"https://api.github.com/users/mgenov/events{/privacy}","received_events_url":"https://api.github.com/users/mgenov/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls/10/commits","review_comments_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls/10/comments","review_comment_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/issues/10/comments","statuses_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/statuses/bd63ab1374e2dd4989fd55f30cffcda7f7940169","head":{"label":"KrasimirRaikov:master","ref":"master","sha":"bd63ab1374e2dd4989fd55f30cffcda7f7940169","user":{"login":"KrasimirRaikov","id":13517204,"avatar_url":"https://avatars.githubusercontent.com/u/13517204?v=3","gravatar_id":"","url":"https://api.github.com/users/KrasimirRaikov","html_url":"https://github.com/KrasimirRaikov","followers_url":"https://api.github.com/users/KrasimirRaikov/followers","following_url":"https://api.github.com/users/KrasimirRaikov/following{/other_user}","gists_url":"https://api.github.com/users/KrasimirRaikov/gists{/gist_id}","starred_url":"https://api.github.com/users/KrasimirRaikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrasimirRaikov/subscriptions","organizations_url":"https://api.github.com/users/KrasimirRaikov/orgs","repos_url":"https://api.github.com/users/KrasimirRaikov/repos","events_url":"https://api.github.com/users/KrasimirRaikov/events{/privacy}","received_events_url":"https://api.github.com/users/KrasimirRaikov/received_events","type":"User","site_admin":false},"repo":{"id":49125764,"name":"networking-and-gui","full_name":"KrasimirRaikov/networking-and-gui","owner":{"login":"KrasimirRaikov","id":13517204,"avatar_url":"https://avatars.githubusercontent.com/u/13517204?v=3","gravatar_id":"","url":"https://api.github.com/users/KrasimirRaikov","html_url":"https://github.com/KrasimirRaikov","followers_url":"https://api.github.com/users/KrasimirRaikov/followers","following_url":"https://api.github.com/users/KrasimirRaikov/following{/other_user}","gists_url":"https://api.github.com/users/KrasimirRaikov/gists{/gist_id}","starred_url":"https://api.github.com/users/KrasimirRaikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrasimirRaikov/subscriptions","organizations_url":"https://api.github.com/users/KrasimirRaikov/orgs","repos_url":"https://api.github.com/users/KrasimirRaikov/repos","events_url":"https://api.github.com/users/KrasimirRaikov/events{/privacy}","received_events_url":"https://api.github.com/users/KrasimirRaikov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KrasimirRaikov/networking-and-gui","description":"Networking and GUI","fork":true,"url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui","forks_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/forks","keys_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/teams","hooks_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/hooks","issue_events_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/issues/events{/number}","events_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/events","assignees_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/assignees{/user}","branches_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/branches{/branch}","tags_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/tags","blobs_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/git/refs{/sha}","trees_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/statuses/{sha}","languages_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/languages","stargazers_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/stargazers","contributors_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/contributors","subscribers_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/subscribers","subscription_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/subscription","commits_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/commits{/sha}","git_commits_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/git/commits{/sha}","comments_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/comments{/number}","issue_comment_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/issues/comments{/number}","contents_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/contents/{+path}","compare_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/merges","archive_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/downloads","issues_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/issues{/number}","pulls_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/pulls{/number}","milestones_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/milestones{/number}","notifications_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/labels{/name}","releases_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/releases{/id}","deployments_url":"https://api.github.com/repos/KrasimirRaikov/networking-and-gui/deployments","created_at":"2016-01-06T09:24:48Z","updated_at":"2016-01-13T07:21:45Z","pushed_at":"2016-02-03T06:15:11Z","git_url":"git://github.com/KrasimirRaikov/networking-and-gui.git","ssh_url":"git@github.com:KrasimirRaikov/networking-and-gui.git","clone_url":"https://github.com/KrasimirRaikov/networking-and-gui.git","svn_url":"https://github.com/KrasimirRaikov/networking-and-gui","homepage":null,"size":1878,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"clouway-incubator:krasimir","ref":"krasimir","sha":"a46662147095faae70cb63689933aba6d055040a","user":{"login":"clouway-incubator","id":10173098,"avatar_url":"https://avatars.githubusercontent.com/u/10173098?v=3","gravatar_id":"","url":"https://api.github.com/users/clouway-incubator","html_url":"https://github.com/clouway-incubator","followers_url":"https://api.github.com/users/clouway-incubator/followers","following_url":"https://api.github.com/users/clouway-incubator/following{/other_user}","gists_url":"https://api.github.com/users/clouway-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/clouway-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clouway-incubator/subscriptions","organizations_url":"https://api.github.com/users/clouway-incubator/orgs","repos_url":"https://api.github.com/users/clouway-incubator/repos","events_url":"https://api.github.com/users/clouway-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/clouway-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":43062597,"name":"networking-and-gui","full_name":"clouway-incubator/networking-and-gui","owner":{"login":"clouway-incubator","id":10173098,"avatar_url":"https://avatars.githubusercontent.com/u/10173098?v=3","gravatar_id":"","url":"https://api.github.com/users/clouway-incubator","html_url":"https://github.com/clouway-incubator","followers_url":"https://api.github.com/users/clouway-incubator/followers","following_url":"https://api.github.com/users/clouway-incubator/following{/other_user}","gists_url":"https://api.github.com/users/clouway-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/clouway-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clouway-incubator/subscriptions","organizations_url":"https://api.github.com/users/clouway-incubator/orgs","repos_url":"https://api.github.com/users/clouway-incubator/repos","events_url":"https://api.github.com/users/clouway-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/clouway-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clouway-incubator/networking-and-gui","description":"Networking and GUI","fork":false,"url":"https://api.github.com/repos/clouway-incubator/networking-and-gui","forks_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/forks","keys_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/teams","hooks_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/hooks","issue_events_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/issues/events{/number}","events_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/events","assignees_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/assignees{/user}","branches_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/branches{/branch}","tags_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/tags","blobs_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/git/refs{/sha}","trees_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/statuses/{sha}","languages_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/languages","stargazers_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/stargazers","contributors_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/contributors","subscribers_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/subscribers","subscription_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/subscription","commits_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/commits{/sha}","git_commits_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/git/commits{/sha}","comments_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/comments{/number}","issue_comment_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/issues/comments{/number}","contents_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/contents/{+path}","compare_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/merges","archive_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/downloads","issues_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/issues{/number}","pulls_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls{/number}","milestones_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/milestones{/number}","notifications_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/labels{/name}","releases_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/releases{/id}","deployments_url":"https://api.github.com/repos/clouway-incubator/networking-and-gui/deployments","created_at":"2015-09-24T11:23:01Z","updated_at":"2015-09-24T11:23:01Z","pushed_at":"2016-02-03T06:16:19Z","git_url":"git://github.com/clouway-incubator/networking-and-gui.git","ssh_url":"git@github.com:clouway-incubator/networking-and-gui.git","clone_url":"https://github.com/clouway-incubator/networking-and-gui.git","svn_url":"https://github.com/clouway-incubator/networking-and-gui","homepage":null,"size":2517,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls/10"},"html":{"href":"https://github.com/clouway-incubator/networking-and-gui/pull/10"},"issue":{"href":"https://api.github.com/repos/clouway-incubator/networking-and-gui/issues/10"},"comments":{"href":"https://api.github.com/repos/clouway-incubator/networking-and-gui/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clouway-incubator/networking-and-gui/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/clouway-incubator/networking-and-gui/statuses/bd63ab1374e2dd4989fd55f30cffcda7f7940169"}}}}