{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments/90149079","pull_request_review_id":10672834,"id":90149079,"diff_hunk":"@@ -0,0 +1,157 @@\n+﻿using System.IO.Pipelines.Networking.Tls.Internal.Sspi;\n+\n+namespace System.IO.Pipelines.Networking.Tls\n+{\n+    public static class ApplicationProtocols\n+    {\n+        private static readonly byte[] _http1 = {0x68, 0x74, 0x74, 0x70, 0x2f, 0x31, 0x2e, 0x31}; //(\"http/1.1\")\n+        private static readonly byte[] _spdy1 = {0x73, 0x70, 0x64, 0x79, 0x2f, 0x31}; //(\"spdy/1\")\n+        private static readonly byte[] _spdy2 = {0x73, 0x70, 0x64, 0x79, 0x2f, 0x32}; //(\"spdy/2\")\n+        private static readonly byte[] _spdy3 = {0x73, 0x70, 0x64, 0x79, 0x2f, 0x33}; //(\"spdy/3\")\n+\n+        private static readonly byte[] _traversalUsingRelaysAroundNAT =\n+        {\n+            0x73, 0x74, 0x75, 0x6E, 0x2E, 0x74, 0x75, 0x72,\n+            0x6E\n+        }; //(\"stun.turn\")\n+\n+        private static readonly byte[] _natDiscoveryUsingSessionTraversalUtilitiesforNAT =\n+        {\n+            0x73, 0x74, 0x75, 0x6E, 0x2E,\n+            0x6e, 0x61, 0x74, 0x2d, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79\n+        }; //(\"stun.nat-discovery\")\n+\n+        private static readonly byte[] _http2overTLS = {0x68, 0x32}; //(\"h2\")\n+        private static readonly byte[] _http2overTCP = {0x68, 0x32, 0x63}; //(\"h2c\")\n+        private static readonly byte[] _webRTCMediaAndData = {0x77, 0x65, 0x62, 0x72, 0x74, 0x63}; //(\"webrtc\")\n+\n+        private static readonly byte[] _confidentialWebRTCMediaAndData =\n+        {\n+            0x63, 0x2d, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63\n+        }; //(\"c-webrtc\")\n+\n+        private static readonly byte[] _Ftp = {0x66, 0x74, 0x70}; //(\"ftp\")\n+\n+        private static readonly byte[][] _allProtocols =\n+        {\n+            _http1, _spdy1, _spdy2, _spdy3, _traversalUsingRelaysAroundNAT,\n+            _natDiscoveryUsingSessionTraversalUtilitiesforNAT, _http2overTLS, _http2overTCP, _webRTCMediaAndData,\n+            _confidentialWebRTCMediaAndData, _Ftp\n+        };\n+\n+        private static readonly Array _numberOfProtocols = Enum.GetValues(typeof(ProtocolIds));\n+\n+        const int _HeaderLength = 10;\n+        const int _ContentOffset = 4;","path":"src/System.IO.Pipelines.Networking.Tls/ApplicationProtocols.cs","position":45,"original_position":45,"commit_id":"318ad06316ad4daadb5f14b31f6e9b016415164d","original_commit_id":"318ad06316ad4daadb5f14b31f6e9b016415164d","user":{"login":"Drawaes","id":16406969,"avatar_url":"https://avatars.githubusercontent.com/u/16406969?v=3","gravatar_id":"","url":"https://api.github.com/users/Drawaes","html_url":"https://github.com/Drawaes","followers_url":"https://api.github.com/users/Drawaes/followers","following_url":"https://api.github.com/users/Drawaes/following{/other_user}","gists_url":"https://api.github.com/users/Drawaes/gists{/gist_id}","starred_url":"https://api.github.com/users/Drawaes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drawaes/subscriptions","organizations_url":"https://api.github.com/users/Drawaes/orgs","repos_url":"https://api.github.com/users/Drawaes/repos","events_url":"https://api.github.com/users/Drawaes/events{/privacy}","received_events_url":"https://api.github.com/users/Drawaes/received_events","type":"User","site_admin":false},"body":"added comments to say how they are calculated, and a link to the RFC that contains the extensions format for clarity.\r\nAdded the modifiers.","created_at":"2016-11-30T00:52:13Z","updated_at":"2016-11-30T00:52:13Z","html_url":"https://github.com/dotnet/corefxlab/pull/991#discussion_r90149079","pull_request_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/991","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments/90149079"},"html":{"href":"https://github.com/dotnet/corefxlab/pull/991#discussion_r90149079"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/991"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefxlab/pulls/991","id":94075851,"html_url":"https://github.com/dotnet/corefxlab/pull/991","diff_url":"https://github.com/dotnet/corefxlab/pull/991.diff","patch_url":"https://github.com/dotnet/corefxlab/pull/991.patch","issue_url":"https://api.github.com/repos/dotnet/corefxlab/issues/991","number":991,"state":"open","locked":false,"title":"Tls Lib for Pipelines","user":{"login":"Drawaes","id":16406969,"avatar_url":"https://avatars.githubusercontent.com/u/16406969?v=3","gravatar_id":"","url":"https://api.github.com/users/Drawaes","html_url":"https://github.com/Drawaes","followers_url":"https://api.github.com/users/Drawaes/followers","following_url":"https://api.github.com/users/Drawaes/following{/other_user}","gists_url":"https://api.github.com/users/Drawaes/gists{/gist_id}","starred_url":"https://api.github.com/users/Drawaes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drawaes/subscriptions","organizations_url":"https://api.github.com/users/Drawaes/orgs","repos_url":"https://api.github.com/users/Drawaes/repos","events_url":"https://api.github.com/users/Drawaes/events{/privacy}","received_events_url":"https://api.github.com/users/Drawaes/received_events","type":"User","site_admin":false},"body":"An attempt to make a low allocation, wicked fast TLS layer for Pipelines. Xplat, and server / multiple connection optimised...yeah","created_at":"2016-11-16T23:55:02Z","updated_at":"2016-11-30T00:52:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a19c973a250cafd575d24ffdc645726ee3dd3d9a","assignee":{"login":"bartonjs","id":10642668,"avatar_url":"https://avatars.githubusercontent.com/u/10642668?v=3","gravatar_id":"","url":"https://api.github.com/users/bartonjs","html_url":"https://github.com/bartonjs","followers_url":"https://api.github.com/users/bartonjs/followers","following_url":"https://api.github.com/users/bartonjs/following{/other_user}","gists_url":"https://api.github.com/users/bartonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bartonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartonjs/subscriptions","organizations_url":"https://api.github.com/users/bartonjs/orgs","repos_url":"https://api.github.com/users/bartonjs/repos","events_url":"https://api.github.com/users/bartonjs/events{/privacy}","received_events_url":"https://api.github.com/users/bartonjs/received_events","type":"User","site_admin":false},"assignees":[{"login":"bartonjs","id":10642668,"avatar_url":"https://avatars.githubusercontent.com/u/10642668?v=3","gravatar_id":"","url":"https://api.github.com/users/bartonjs","html_url":"https://github.com/bartonjs","followers_url":"https://api.github.com/users/bartonjs/followers","following_url":"https://api.github.com/users/bartonjs/following{/other_user}","gists_url":"https://api.github.com/users/bartonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bartonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartonjs/subscriptions","organizations_url":"https://api.github.com/users/bartonjs/orgs","repos_url":"https://api.github.com/users/bartonjs/repos","events_url":"https://api.github.com/users/bartonjs/events{/privacy}","received_events_url":"https://api.github.com/users/bartonjs/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/991/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/991/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefxlab/issues/991/comments","statuses_url":"https://api.github.com/repos/dotnet/corefxlab/statuses/318ad06316ad4daadb5f14b31f6e9b016415164d","head":{"label":"Drawaes:master","ref":"master","sha":"318ad06316ad4daadb5f14b31f6e9b016415164d","user":{"login":"Drawaes","id":16406969,"avatar_url":"https://avatars.githubusercontent.com/u/16406969?v=3","gravatar_id":"","url":"https://api.github.com/users/Drawaes","html_url":"https://github.com/Drawaes","followers_url":"https://api.github.com/users/Drawaes/followers","following_url":"https://api.github.com/users/Drawaes/following{/other_user}","gists_url":"https://api.github.com/users/Drawaes/gists{/gist_id}","starred_url":"https://api.github.com/users/Drawaes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drawaes/subscriptions","organizations_url":"https://api.github.com/users/Drawaes/orgs","repos_url":"https://api.github.com/users/Drawaes/repos","events_url":"https://api.github.com/users/Drawaes/events{/privacy}","received_events_url":"https://api.github.com/users/Drawaes/received_events","type":"User","site_admin":false},"repo":{"id":73961242,"name":"corefxlab","full_name":"Drawaes/corefxlab","owner":{"login":"Drawaes","id":16406969,"avatar_url":"https://avatars.githubusercontent.com/u/16406969?v=3","gravatar_id":"","url":"https://api.github.com/users/Drawaes","html_url":"https://github.com/Drawaes","followers_url":"https://api.github.com/users/Drawaes/followers","following_url":"https://api.github.com/users/Drawaes/following{/other_user}","gists_url":"https://api.github.com/users/Drawaes/gists{/gist_id}","starred_url":"https://api.github.com/users/Drawaes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drawaes/subscriptions","organizations_url":"https://api.github.com/users/Drawaes/orgs","repos_url":"https://api.github.com/users/Drawaes/repos","events_url":"https://api.github.com/users/Drawaes/events{/privacy}","received_events_url":"https://api.github.com/users/Drawaes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Drawaes/corefxlab","description":"This repo is for experimentation and exploring new ideas that may or may not make it into the main corefx repo.","fork":true,"url":"https://api.github.com/repos/Drawaes/corefxlab","forks_url":"https://api.github.com/repos/Drawaes/corefxlab/forks","keys_url":"https://api.github.com/repos/Drawaes/corefxlab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Drawaes/corefxlab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Drawaes/corefxlab/teams","hooks_url":"https://api.github.com/repos/Drawaes/corefxlab/hooks","issue_events_url":"https://api.github.com/repos/Drawaes/corefxlab/issues/events{/number}","events_url":"https://api.github.com/repos/Drawaes/corefxlab/events","assignees_url":"https://api.github.com/repos/Drawaes/corefxlab/assignees{/user}","branches_url":"https://api.github.com/repos/Drawaes/corefxlab/branches{/branch}","tags_url":"https://api.github.com/repos/Drawaes/corefxlab/tags","blobs_url":"https://api.github.com/repos/Drawaes/corefxlab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Drawaes/corefxlab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Drawaes/corefxlab/git/refs{/sha}","trees_url":"https://api.github.com/repos/Drawaes/corefxlab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Drawaes/corefxlab/statuses/{sha}","languages_url":"https://api.github.com/repos/Drawaes/corefxlab/languages","stargazers_url":"https://api.github.com/repos/Drawaes/corefxlab/stargazers","contributors_url":"https://api.github.com/repos/Drawaes/corefxlab/contributors","subscribers_url":"https://api.github.com/repos/Drawaes/corefxlab/subscribers","subscription_url":"https://api.github.com/repos/Drawaes/corefxlab/subscription","commits_url":"https://api.github.com/repos/Drawaes/corefxlab/commits{/sha}","git_commits_url":"https://api.github.com/repos/Drawaes/corefxlab/git/commits{/sha}","comments_url":"https://api.github.com/repos/Drawaes/corefxlab/comments{/number}","issue_comment_url":"https://api.github.com/repos/Drawaes/corefxlab/issues/comments{/number}","contents_url":"https://api.github.com/repos/Drawaes/corefxlab/contents/{+path}","compare_url":"https://api.github.com/repos/Drawaes/corefxlab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Drawaes/corefxlab/merges","archive_url":"https://api.github.com/repos/Drawaes/corefxlab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Drawaes/corefxlab/downloads","issues_url":"https://api.github.com/repos/Drawaes/corefxlab/issues{/number}","pulls_url":"https://api.github.com/repos/Drawaes/corefxlab/pulls{/number}","milestones_url":"https://api.github.com/repos/Drawaes/corefxlab/milestones{/number}","notifications_url":"https://api.github.com/repos/Drawaes/corefxlab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Drawaes/corefxlab/labels{/name}","releases_url":"https://api.github.com/repos/Drawaes/corefxlab/releases{/id}","deployments_url":"https://api.github.com/repos/Drawaes/corefxlab/deployments","created_at":"2016-11-16T21:08:33Z","updated_at":"2016-11-16T21:08:35Z","pushed_at":"2016-11-24T21:32:49Z","git_url":"git://github.com/Drawaes/corefxlab.git","ssh_url":"git@github.com:Drawaes/corefxlab.git","clone_url":"https://github.com/Drawaes/corefxlab.git","svn_url":"https://github.com/Drawaes/corefxlab","homepage":"","size":30229,"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":"bec8c6f99f2c0e957f6af27c100ee8de69e65570","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":29504192,"name":"corefxlab","full_name":"dotnet/corefxlab","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/corefxlab","description":"This repo is for experimentation and exploring new ideas that may or may not make it into the main corefx repo.","fork":false,"url":"https://api.github.com/repos/dotnet/corefxlab","forks_url":"https://api.github.com/repos/dotnet/corefxlab/forks","keys_url":"https://api.github.com/repos/dotnet/corefxlab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefxlab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefxlab/teams","hooks_url":"https://api.github.com/repos/dotnet/corefxlab/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefxlab/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefxlab/events","assignees_url":"https://api.github.com/repos/dotnet/corefxlab/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefxlab/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefxlab/tags","blobs_url":"https://api.github.com/repos/dotnet/corefxlab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefxlab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefxlab/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefxlab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefxlab/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefxlab/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefxlab/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefxlab/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefxlab/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefxlab/subscription","commits_url":"https://api.github.com/repos/dotnet/corefxlab/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefxlab/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefxlab/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefxlab/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefxlab/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefxlab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefxlab/merges","archive_url":"https://api.github.com/repos/dotnet/corefxlab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefxlab/downloads","issues_url":"https://api.github.com/repos/dotnet/corefxlab/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefxlab/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefxlab/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefxlab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefxlab/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefxlab/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/corefxlab/deployments","created_at":"2015-01-20T00:44:35Z","updated_at":"2016-11-29T20:53:35Z","pushed_at":"2016-11-30T00:29:49Z","git_url":"git://github.com/dotnet/corefxlab.git","ssh_url":"git@github.com:dotnet/corefxlab.git","clone_url":"https://github.com/dotnet/corefxlab.git","svn_url":"https://github.com/dotnet/corefxlab","homepage":"","size":31083,"stargazers_count":510,"watchers_count":510,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":165,"mirror_url":null,"open_issues_count":147,"forks":165,"open_issues":147,"watchers":510,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/991"},"html":{"href":"https://github.com/dotnet/corefxlab/pull/991"},"issue":{"href":"https://api.github.com/repos/dotnet/corefxlab/issues/991"},"comments":{"href":"https://api.github.com/repos/dotnet/corefxlab/issues/991/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/991/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/991/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefxlab/statuses/318ad06316ad4daadb5f14b31f6e9b016415164d"}}}}
{"actor":{"display_login":"Drawaes"}}