{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/wcf/pulls/comments/44329022","id":44329022,"diff_hunk":"@@ -31,6 +31,62 @@ public interface IConnection\n         int EndRead();\n     }\n \n+    public static class IConnectionExtensions\n+    {\n+        public static async Task WriteAsync(this IConnection connection, byte[] buffer, int offset, int size, bool immediate, TimeSpan timeout)\n+        {\n+            var tcs = new TaskCompletionSource<bool>();\n+            var result = connection.BeginWrite(buffer, offset, size, immediate, timeout, OnIoComplete, tcs);\n+            if (result == AsyncCompletionResult.Completed)\n+            {\n+                tcs.SetResult(true);\n+            }\n+\n+            await tcs.Task;\n+            connection.EndWrite();\n+        }\n+\n+        public static async Task<int> ReadAsync(this IConnection connection, int offset, int size, TimeSpan timeout)","path":"src/System.Private.ServiceModel/src/System/ServiceModel/Channels/Connection.cs","position":19,"original_position":19,"commit_id":"bbc5e8c90b825554c0685c7651a5aeae4d9d4c3f","original_commit_id":"bbc5e8c90b825554c0685c7651a5aeae4d9d4c3f","user":{"login":"shmao","id":12262109,"avatar_url":"https://avatars.githubusercontent.com/u/12262109?v=3","gravatar_id":"","url":"https://api.github.com/users/shmao","html_url":"https://github.com/shmao","followers_url":"https://api.github.com/users/shmao/followers","following_url":"https://api.github.com/users/shmao/following{/other_user}","gists_url":"https://api.github.com/users/shmao/gists{/gist_id}","starred_url":"https://api.github.com/users/shmao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shmao/subscriptions","organizations_url":"https://api.github.com/users/shmao/orgs","repos_url":"https://api.github.com/users/shmao/repos","events_url":"https://api.github.com/users/shmao/events{/privacy}","received_events_url":"https://api.github.com/users/shmao/received_events","type":"User","site_admin":false},"body":"This overload is not only used by the other overload only. It's used by ConnectionUpgradeHelper.DecodeFramingFaultAsync as well. ","created_at":"2015-11-09T20:47:34Z","updated_at":"2015-11-09T20:47:34Z","html_url":"https://github.com/dotnet/wcf/pull/509#discussion_r44329022","pull_request_url":"https://api.github.com/repos/dotnet/wcf/pulls/509","_links":{"self":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/comments/44329022"},"html":{"href":"https://github.com/dotnet/wcf/pull/509#discussion_r44329022"},"pull_request":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/509"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/wcf/pulls/509","id":50008527,"html_url":"https://github.com/dotnet/wcf/pull/509","diff_url":"https://github.com/dotnet/wcf/pull/509.diff","patch_url":"https://github.com/dotnet/wcf/pull/509.patch","issue_url":"https://api.github.com/repos/dotnet/wcf/issues/509","number":509,"state":"open","locked":false,"title":" Light up async paths needed for Ssl StreamSecurity (I)","user":{"login":"shmao","id":12262109,"avatar_url":"https://avatars.githubusercontent.com/u/12262109?v=3","gravatar_id":"","url":"https://api.github.com/users/shmao","html_url":"https://github.com/shmao","followers_url":"https://api.github.com/users/shmao/followers","following_url":"https://api.github.com/users/shmao/following{/other_user}","gists_url":"https://api.github.com/users/shmao/gists{/gist_id}","starred_url":"https://api.github.com/users/shmao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shmao/subscriptions","organizations_url":"https://api.github.com/users/shmao/orgs","repos_url":"https://api.github.com/users/shmao/repos","events_url":"https://api.github.com/users/shmao/events{/privacy}","received_events_url":"https://api.github.com/users/shmao/received_events","type":"User","site_admin":false},"body":"Made ClientFramingDuplexSessionChannel.SendPreambleAsync use async methods.\r\n\r\nPart of the fix for #303 .","created_at":"2015-11-06T21:45:47Z","updated_at":"2015-11-09T20:47:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99db42b71bf8b9220102c4bc6caef7df45de6b02","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/wcf/pulls/509/commits","review_comments_url":"https://api.github.com/repos/dotnet/wcf/pulls/509/comments","review_comment_url":"https://api.github.com/repos/dotnet/wcf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/wcf/issues/509/comments","statuses_url":"https://api.github.com/repos/dotnet/wcf/statuses/bbc5e8c90b825554c0685c7651a5aeae4d9d4c3f","head":{"label":"shmao:issue303","ref":"issue303","sha":"bbc5e8c90b825554c0685c7651a5aeae4d9d4c3f","user":{"login":"shmao","id":12262109,"avatar_url":"https://avatars.githubusercontent.com/u/12262109?v=3","gravatar_id":"","url":"https://api.github.com/users/shmao","html_url":"https://github.com/shmao","followers_url":"https://api.github.com/users/shmao/followers","following_url":"https://api.github.com/users/shmao/following{/other_user}","gists_url":"https://api.github.com/users/shmao/gists{/gist_id}","starred_url":"https://api.github.com/users/shmao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shmao/subscriptions","organizations_url":"https://api.github.com/users/shmao/orgs","repos_url":"https://api.github.com/users/shmao/repos","events_url":"https://api.github.com/users/shmao/events{/privacy}","received_events_url":"https://api.github.com/users/shmao/received_events","type":"User","site_admin":false},"repo":{"id":39473264,"name":"wcf","full_name":"shmao/wcf","owner":{"login":"shmao","id":12262109,"avatar_url":"https://avatars.githubusercontent.com/u/12262109?v=3","gravatar_id":"","url":"https://api.github.com/users/shmao","html_url":"https://github.com/shmao","followers_url":"https://api.github.com/users/shmao/followers","following_url":"https://api.github.com/users/shmao/following{/other_user}","gists_url":"https://api.github.com/users/shmao/gists{/gist_id}","starred_url":"https://api.github.com/users/shmao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shmao/subscriptions","organizations_url":"https://api.github.com/users/shmao/orgs","repos_url":"https://api.github.com/users/shmao/repos","events_url":"https://api.github.com/users/shmao/events{/privacy}","received_events_url":"https://api.github.com/users/shmao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shmao/wcf","description":"This repo contains the client-oriented WCF libraries that enable applications built on .NET Core to communicate with WCF services.","fork":true,"url":"https://api.github.com/repos/shmao/wcf","forks_url":"https://api.github.com/repos/shmao/wcf/forks","keys_url":"https://api.github.com/repos/shmao/wcf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shmao/wcf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shmao/wcf/teams","hooks_url":"https://api.github.com/repos/shmao/wcf/hooks","issue_events_url":"https://api.github.com/repos/shmao/wcf/issues/events{/number}","events_url":"https://api.github.com/repos/shmao/wcf/events","assignees_url":"https://api.github.com/repos/shmao/wcf/assignees{/user}","branches_url":"https://api.github.com/repos/shmao/wcf/branches{/branch}","tags_url":"https://api.github.com/repos/shmao/wcf/tags","blobs_url":"https://api.github.com/repos/shmao/wcf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shmao/wcf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shmao/wcf/git/refs{/sha}","trees_url":"https://api.github.com/repos/shmao/wcf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shmao/wcf/statuses/{sha}","languages_url":"https://api.github.com/repos/shmao/wcf/languages","stargazers_url":"https://api.github.com/repos/shmao/wcf/stargazers","contributors_url":"https://api.github.com/repos/shmao/wcf/contributors","subscribers_url":"https://api.github.com/repos/shmao/wcf/subscribers","subscription_url":"https://api.github.com/repos/shmao/wcf/subscription","commits_url":"https://api.github.com/repos/shmao/wcf/commits{/sha}","git_commits_url":"https://api.github.com/repos/shmao/wcf/git/commits{/sha}","comments_url":"https://api.github.com/repos/shmao/wcf/comments{/number}","issue_comment_url":"https://api.github.com/repos/shmao/wcf/issues/comments{/number}","contents_url":"https://api.github.com/repos/shmao/wcf/contents/{+path}","compare_url":"https://api.github.com/repos/shmao/wcf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shmao/wcf/merges","archive_url":"https://api.github.com/repos/shmao/wcf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shmao/wcf/downloads","issues_url":"https://api.github.com/repos/shmao/wcf/issues{/number}","pulls_url":"https://api.github.com/repos/shmao/wcf/pulls{/number}","milestones_url":"https://api.github.com/repos/shmao/wcf/milestones{/number}","notifications_url":"https://api.github.com/repos/shmao/wcf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shmao/wcf/labels{/name}","releases_url":"https://api.github.com/repos/shmao/wcf/releases{/id}","created_at":"2015-07-21T22:36:48Z","updated_at":"2015-07-21T22:36:50Z","pushed_at":"2015-11-06T22:51:25Z","git_url":"git://github.com/shmao/wcf.git","ssh_url":"git@github.com:shmao/wcf.git","clone_url":"https://github.com/shmao/wcf.git","svn_url":"https://github.com/shmao/wcf","homepage":"","size":2802,"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":"9fb03564762ab14a45ad4cf300b06029877c9722","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":35562993,"name":"wcf","full_name":"dotnet/wcf","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/wcf","description":"This repo contains the client-oriented WCF libraries that enable applications built on .NET Core to communicate with WCF services.","fork":false,"url":"https://api.github.com/repos/dotnet/wcf","forks_url":"https://api.github.com/repos/dotnet/wcf/forks","keys_url":"https://api.github.com/repos/dotnet/wcf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/wcf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/wcf/teams","hooks_url":"https://api.github.com/repos/dotnet/wcf/hooks","issue_events_url":"https://api.github.com/repos/dotnet/wcf/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/wcf/events","assignees_url":"https://api.github.com/repos/dotnet/wcf/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/wcf/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/wcf/tags","blobs_url":"https://api.github.com/repos/dotnet/wcf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/wcf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/wcf/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/wcf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/wcf/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/wcf/languages","stargazers_url":"https://api.github.com/repos/dotnet/wcf/stargazers","contributors_url":"https://api.github.com/repos/dotnet/wcf/contributors","subscribers_url":"https://api.github.com/repos/dotnet/wcf/subscribers","subscription_url":"https://api.github.com/repos/dotnet/wcf/subscription","commits_url":"https://api.github.com/repos/dotnet/wcf/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/wcf/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/wcf/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/wcf/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/wcf/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/wcf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/wcf/merges","archive_url":"https://api.github.com/repos/dotnet/wcf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/wcf/downloads","issues_url":"https://api.github.com/repos/dotnet/wcf/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/wcf/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/wcf/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/wcf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/wcf/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/wcf/releases{/id}","created_at":"2015-05-13T17:17:03Z","updated_at":"2015-11-04T19:24:55Z","pushed_at":"2015-11-06T22:51:25Z","git_url":"git://github.com/dotnet/wcf.git","ssh_url":"git@github.com:dotnet/wcf.git","clone_url":"https://github.com/dotnet/wcf.git","svn_url":"https://github.com/dotnet/wcf","homepage":"","size":7101,"stargazers_count":523,"watchers_count":523,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":165,"mirror_url":null,"open_issues_count":103,"forks":165,"open_issues":103,"watchers":523,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/509"},"html":{"href":"https://github.com/dotnet/wcf/pull/509"},"issue":{"href":"https://api.github.com/repos/dotnet/wcf/issues/509"},"comments":{"href":"https://api.github.com/repos/dotnet/wcf/issues/509/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/509/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/509/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/wcf/statuses/bbc5e8c90b825554c0685c7651a5aeae4d9d4c3f"}}}}