{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/comments/48190964","id":48190964,"diff_hunk":"@@ -0,0 +1,221 @@\n+﻿// Copyright (c) Microsoft. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n+\n+using System.IO;\n+using System.Net.Test.Common;\n+using System.Text;\n+using System.Threading;\n+\n+using Xunit;\n+using Xunit.Abstractions;\n+\n+namespace System.Net.Sockets.Tests\n+{\n+    public class UnixDomainSocketTest : IDisposable\n+    {\n+        private readonly ITestOutputHelper _log;\n+        private readonly string _path;\n+        private readonly UnixDomainSocketEndPoint _endPoint;\n+\n+        public UnixDomainSocketTest(ITestOutputHelper output)\n+        {\n+            _log = TestLogging.GetInstance();\n+            _path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());\n+            if (File.Exists(_path))\n+            {\n+                File.Delete(_path);\n+            }\n+\n+            _endPoint = new UnixDomainSocketEndPoint(_path);\n+        }\n+\n+        private void OnConnectAsyncCompleted(object sender, SocketAsyncEventArgs args)\n+        {\n+            ManualResetEvent complete = (ManualResetEvent)args.UserToken;\n+            complete.Set();\n+        }\n+\n+        [Fact]\n+        [PlatformSpecific(PlatformID.Windows)]\n+        public void Socket_CreateUnixDomainSocket_Throws_OnWindows()\n+        {\n+            Assert.False(Capability.UnixDomainSocketsSupport());\n+            Assert.Throws<SocketException>(() => new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.Unspecified));","path":"src/System.Net.Sockets/tests/FunctionalTests/UnixDomainSocketTest.cs","position":34,"original_position":43,"commit_id":"0b82483419ad873924d48b0493b9eca4f11f50b6","original_commit_id":"db4f3a197c55bdea3abc2ac37e8e19676632b1d9","user":{"login":"CIPop","id":8635911,"avatar_url":"https://avatars.githubusercontent.com/u/8635911?v=3","gravatar_id":"","url":"https://api.github.com/users/CIPop","html_url":"https://github.com/CIPop","followers_url":"https://api.github.com/users/CIPop/followers","following_url":"https://api.github.com/users/CIPop/following{/other_user}","gists_url":"https://api.github.com/users/CIPop/gists{/gist_id}","starred_url":"https://api.github.com/users/CIPop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CIPop/subscriptions","organizations_url":"https://api.github.com/users/CIPop/orgs","repos_url":"https://api.github.com/users/CIPop/repos","events_url":"https://api.github.com/users/CIPop/events{/privacy}","received_events_url":"https://api.github.com/users/CIPop/received_events","type":"User","site_admin":false},"body":"What is the text of the exception? Would it make the error easy to understand and correct for the developer?\r\nMy main concern here are cases where the developer is receiving this exception from a 3rd party library that his app is referencing,","created_at":"2015-12-21T20:57:49Z","updated_at":"2015-12-21T20:57:49Z","html_url":"https://github.com/dotnet/corefx/pull/5051#discussion_r48190964","pull_request_url":"https://api.github.com/repos/dotnet/corefx/pulls/5051","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments/48190964"},"html":{"href":"https://github.com/dotnet/corefx/pull/5051#discussion_r48190964"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/5051"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/5051","id":54037031,"html_url":"https://github.com/dotnet/corefx/pull/5051","diff_url":"https://github.com/dotnet/corefx/pull/5051.diff","patch_url":"https://github.com/dotnet/corefx/pull/5051.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/5051","number":5051,"state":"open","locked":false,"title":"Enable custom socket end points and allow Unix Domain Sockets","user":{"login":"IlyaBiryukov","id":15989459,"avatar_url":"https://avatars.githubusercontent.com/u/15989459?v=3","gravatar_id":"","url":"https://api.github.com/users/IlyaBiryukov","html_url":"https://github.com/IlyaBiryukov","followers_url":"https://api.github.com/users/IlyaBiryukov/followers","following_url":"https://api.github.com/users/IlyaBiryukov/following{/other_user}","gists_url":"https://api.github.com/users/IlyaBiryukov/gists{/gist_id}","starred_url":"https://api.github.com/users/IlyaBiryukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IlyaBiryukov/subscriptions","organizations_url":"https://api.github.com/users/IlyaBiryukov/orgs","repos_url":"https://api.github.com/users/IlyaBiryukov/repos","events_url":"https://api.github.com/users/IlyaBiryukov/events{/privacy}","received_events_url":"https://api.github.com/users/IlyaBiryukov/received_events","type":"User","site_admin":false},"body":"With code separation into System.Net.Primitives and System.Net.Sockets,\r\nEndPoint extensibility was broken because System.Net.Sockets started to\r\nuse its own copy of SocketAddress and didn't respect SocketAddress that\r\na custom EndPoint may provide.\r\n\r\nThe fix is to allow conversion between SocketAddress from System.Net.Primitives\r\nand System.Net.Sockets. This way custom implementations of EndPoint will\r\nbe able to provide their own SocketAddress and it'll be honored by the\r\nSocket APIs.\r\n\r\nThe fix also allows sockets to use 'Unspecified' protocol type which is\r\nneeded for Unix Domain Sockets. There are several changes in socket test\r\nserver to allow tests pass protocol type.\r\n\r\nAdd new unit tests that use end point extensibility to implement Unix\r\nDomain Sockets.\r\n\r\nFix #4777","created_at":"2015-12-17T21:55:09Z","updated_at":"2015-12-21T20:57:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e7eb23b6cf08c9df8c2465b0a9b0ccb534b25a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/5051/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/5051/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/5051/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/0b82483419ad873924d48b0493b9eca4f11f50b6","head":{"label":"IlyaBiryukov:issue-4777-fix1","ref":"issue-4777-fix1","sha":"0b82483419ad873924d48b0493b9eca4f11f50b6","user":{"login":"IlyaBiryukov","id":15989459,"avatar_url":"https://avatars.githubusercontent.com/u/15989459?v=3","gravatar_id":"","url":"https://api.github.com/users/IlyaBiryukov","html_url":"https://github.com/IlyaBiryukov","followers_url":"https://api.github.com/users/IlyaBiryukov/followers","following_url":"https://api.github.com/users/IlyaBiryukov/following{/other_user}","gists_url":"https://api.github.com/users/IlyaBiryukov/gists{/gist_id}","starred_url":"https://api.github.com/users/IlyaBiryukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IlyaBiryukov/subscriptions","organizations_url":"https://api.github.com/users/IlyaBiryukov/orgs","repos_url":"https://api.github.com/users/IlyaBiryukov/repos","events_url":"https://api.github.com/users/IlyaBiryukov/events{/privacy}","received_events_url":"https://api.github.com/users/IlyaBiryukov/received_events","type":"User","site_admin":false},"repo":{"id":48062880,"name":"corefx","full_name":"IlyaBiryukov/corefx","owner":{"login":"IlyaBiryukov","id":15989459,"avatar_url":"https://avatars.githubusercontent.com/u/15989459?v=3","gravatar_id":"","url":"https://api.github.com/users/IlyaBiryukov","html_url":"https://github.com/IlyaBiryukov","followers_url":"https://api.github.com/users/IlyaBiryukov/followers","following_url":"https://api.github.com/users/IlyaBiryukov/following{/other_user}","gists_url":"https://api.github.com/users/IlyaBiryukov/gists{/gist_id}","starred_url":"https://api.github.com/users/IlyaBiryukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IlyaBiryukov/subscriptions","organizations_url":"https://api.github.com/users/IlyaBiryukov/orgs","repos_url":"https://api.github.com/users/IlyaBiryukov/repos","events_url":"https://api.github.com/users/IlyaBiryukov/events{/privacy}","received_events_url":"https://api.github.com/users/IlyaBiryukov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IlyaBiryukov/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":true,"url":"https://api.github.com/repos/IlyaBiryukov/corefx","forks_url":"https://api.github.com/repos/IlyaBiryukov/corefx/forks","keys_url":"https://api.github.com/repos/IlyaBiryukov/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IlyaBiryukov/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IlyaBiryukov/corefx/teams","hooks_url":"https://api.github.com/repos/IlyaBiryukov/corefx/hooks","issue_events_url":"https://api.github.com/repos/IlyaBiryukov/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/IlyaBiryukov/corefx/events","assignees_url":"https://api.github.com/repos/IlyaBiryukov/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/IlyaBiryukov/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/IlyaBiryukov/corefx/tags","blobs_url":"https://api.github.com/repos/IlyaBiryukov/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IlyaBiryukov/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IlyaBiryukov/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/IlyaBiryukov/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IlyaBiryukov/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/IlyaBiryukov/corefx/languages","stargazers_url":"https://api.github.com/repos/IlyaBiryukov/corefx/stargazers","contributors_url":"https://api.github.com/repos/IlyaBiryukov/corefx/contributors","subscribers_url":"https://api.github.com/repos/IlyaBiryukov/corefx/subscribers","subscription_url":"https://api.github.com/repos/IlyaBiryukov/corefx/subscription","commits_url":"https://api.github.com/repos/IlyaBiryukov/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/IlyaBiryukov/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/IlyaBiryukov/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/IlyaBiryukov/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/IlyaBiryukov/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/IlyaBiryukov/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IlyaBiryukov/corefx/merges","archive_url":"https://api.github.com/repos/IlyaBiryukov/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IlyaBiryukov/corefx/downloads","issues_url":"https://api.github.com/repos/IlyaBiryukov/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/IlyaBiryukov/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/IlyaBiryukov/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/IlyaBiryukov/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IlyaBiryukov/corefx/labels{/name}","releases_url":"https://api.github.com/repos/IlyaBiryukov/corefx/releases{/id}","created_at":"2015-12-15T18:59:29Z","updated_at":"2015-12-15T18:59:50Z","pushed_at":"2015-12-19T00:24:22Z","git_url":"git://github.com/IlyaBiryukov/corefx.git","ssh_url":"git@github.com:IlyaBiryukov/corefx.git","clone_url":"https://github.com/IlyaBiryukov/corefx.git","svn_url":"https://github.com/IlyaBiryukov/corefx","homepage":"http://dotnet.github.io/","size":42968,"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":"dotnet:master","ref":"master","sha":"6816668434550e47808af427194abe6d3e16ff11","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":26295345,"name":"corefx","full_name":"dotnet/corefx","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":false,"url":"https://api.github.com/repos/dotnet/corefx","forks_url":"https://api.github.com/repos/dotnet/corefx/forks","keys_url":"https://api.github.com/repos/dotnet/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefx/teams","hooks_url":"https://api.github.com/repos/dotnet/corefx/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefx/events","assignees_url":"https://api.github.com/repos/dotnet/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefx/tags","blobs_url":"https://api.github.com/repos/dotnet/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefx/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefx/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefx/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefx/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefx/subscription","commits_url":"https://api.github.com/repos/dotnet/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefx/merges","archive_url":"https://api.github.com/repos/dotnet/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefx/downloads","issues_url":"https://api.github.com/repos/dotnet/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefx/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefx/releases{/id}","created_at":"2014-11-06T23:42:48Z","updated_at":"2015-12-21T17:58:21Z","pushed_at":"2015-12-21T19:56:05Z","git_url":"git://github.com/dotnet/corefx.git","ssh_url":"git@github.com:dotnet/corefx.git","clone_url":"https://github.com/dotnet/corefx.git","svn_url":"https://github.com/dotnet/corefx","homepage":"http://dotnet.github.io/","size":53064,"stargazers_count":8812,"watchers_count":8812,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2014,"mirror_url":null,"open_issues_count":823,"forks":2014,"open_issues":823,"watchers":8812,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/5051"},"html":{"href":"https://github.com/dotnet/corefx/pull/5051"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/5051"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/5051/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/5051/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/5051/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/0b82483419ad873924d48b0493b9eca4f11f50b6"}}}}