{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/SignalR/pulls/comments/196997652","pull_request_review_id":130651824,"id":196997652,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Njk5NzY1Mg==","diff_hunk":"@@ -17,28 +19,39 @@ public static class HandshakeProtocol\n     {\n         private const string ProtocolPropertyName = \"protocol\";\n         private const string ProtocolVersionPropertyName = \"version\";\n+        private const string MinorVersionName = \"minorVersion\";\n         private const string ErrorPropertyName = \"error\";\n         private const string TypePropertyName = \"type\";\n \n-        /// <summary>\n-        /// The serialized representation of a success handshake.\n-        /// </summary>\n-        public static ReadOnlyMemory<byte> SuccessHandshakeData;\n+        [Obsolete()]","path":"src/Microsoft.AspNetCore.SignalR.Common/Protocol/HandshakeProtocol.cs","position":21,"original_position":21,"commit_id":"8a91ccea42237d5d392084293a34dc51dbe511b1","original_commit_id":"8a91ccea42237d5d392084293a34dc51dbe511b1","user":{"login":"JamesNK","id":303201,"node_id":"MDQ6VXNlcjMwMzIwMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/303201?v=4","gravatar_id":"","url":"https://api.github.com/users/JamesNK","html_url":"https://github.com/JamesNK","followers_url":"https://api.github.com/users/JamesNK/followers","following_url":"https://api.github.com/users/JamesNK/following{/other_user}","gists_url":"https://api.github.com/users/JamesNK/gists{/gist_id}","starred_url":"https://api.github.com/users/JamesNK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamesNK/subscriptions","organizations_url":"https://api.github.com/users/JamesNK/orgs","repos_url":"https://api.github.com/users/JamesNK/repos","events_url":"https://api.github.com/users/JamesNK/events{/privacy}","received_events_url":"https://api.github.com/users/JamesNK/received_events","type":"User","site_admin":false},"body":"Add a reason to the attribute.","created_at":"2018-06-21T02:51:14Z","updated_at":"2018-06-21T03:00:37Z","html_url":"https://github.com/aspnet/SignalR/pull/2520#discussion_r196997652","pull_request_url":"https://api.github.com/repos/aspnet/SignalR/pulls/2520","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/aspnet/SignalR/pulls/comments/196997652"},"html":{"href":"https://github.com/aspnet/SignalR/pull/2520#discussion_r196997652"},"pull_request":{"href":"https://api.github.com/repos/aspnet/SignalR/pulls/2520"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/SignalR/pulls/2520","id":196300939,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2MzAwOTM5","html_url":"https://github.com/aspnet/SignalR/pull/2520","diff_url":"https://github.com/aspnet/SignalR/pull/2520.diff","patch_url":"https://github.com/aspnet/SignalR/pull/2520.patch","issue_url":"https://api.github.com/repos/aspnet/SignalR/issues/2520","number":2520,"state":"open","locked":false,"title":"Dygray/handshake versioning","user":{"login":"DylanDmitri","id":13950346,"node_id":"MDQ6VXNlcjEzOTUwMzQ2","avatar_url":"https://avatars0.githubusercontent.com/u/13950346?v=4","gravatar_id":"","url":"https://api.github.com/users/DylanDmitri","html_url":"https://github.com/DylanDmitri","followers_url":"https://api.github.com/users/DylanDmitri/followers","following_url":"https://api.github.com/users/DylanDmitri/following{/other_user}","gists_url":"https://api.github.com/users/DylanDmitri/gists{/gist_id}","starred_url":"https://api.github.com/users/DylanDmitri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DylanDmitri/subscriptions","organizations_url":"https://api.github.com/users/DylanDmitri/orgs","repos_url":"https://api.github.com/users/DylanDmitri/repos","events_url":"https://api.github.com/users/DylanDmitri/events{/privacy}","received_events_url":"https://api.github.com/users/DylanDmitri/received_events","type":"User","site_admin":false},"body":"After negotiating handshake, server replies with a `minorVersion` field. This is the minor version of the agreed upon protocol. This is a declaration by the server, not a negotiation. The minor version field is stored on the client, and will be used to gate features that are added later (for example, does this server support streaming?).\r\n\r\nIn general, if no minor version number is given (old server) it defaults to 0, because 0 is a low number.\r\n\r\nNo adding fields to `IHubProtocol`, so made a new `IHubProtocolWithMinorVersion`. Feels bad, but oh well.\r\n\r\nMessage caching:\r\n - `HandshakeProtocol` used to cache a single success message (empty error) in the `public static ReadOnlyMemory<byte> SuccessHandshakeData`. Eliminating this is technically a breaking change, so instead it's marked as obsolete and hardcoded to same series of bytes the default message would've serialized to previously.\r\n\r\n- With the addition of a `minorVersion` field, there's multiple possible return messages. Fortunately there's not many (no more than the number of protocols your server supports). Added a lookup dictionary for this caching. \r\n\r\n- Checked `HubConnectionContextBenchmark`; the additional dictionary overhead makes the handshake response ~2% slower (from `2.05 us` to `2.09 us`). For reference, adding caching makes the response ~20 times faster.","created_at":"2018-06-20T23:43:22Z","updated_at":"2018-06-21T03:00:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52dda0eb1c05c71f3749fe51b18161293810561e","assignee":null,"assignees":[],"requested_reviewers":[{"login":"anurse","id":7574,"node_id":"MDQ6VXNlcjc1NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/7574?v=4","gravatar_id":"","url":"https://api.github.com/users/anurse","html_url":"https://github.com/anurse","followers_url":"https://api.github.com/users/anurse/followers","following_url":"https://api.github.com/users/anurse/following{/other_user}","gists_url":"https://api.github.com/users/anurse/gists{/gist_id}","starred_url":"https://api.github.com/users/anurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anurse/subscriptions","organizations_url":"https://api.github.com/users/anurse/orgs","repos_url":"https://api.github.com/users/anurse/repos","events_url":"https://api.github.com/users/anurse/events{/privacy}","received_events_url":"https://api.github.com/users/anurse/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/SignalR/pulls/2520/commits","review_comments_url":"https://api.github.com/repos/aspnet/SignalR/pulls/2520/comments","review_comment_url":"https://api.github.com/repos/aspnet/SignalR/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/SignalR/issues/2520/comments","statuses_url":"https://api.github.com/repos/aspnet/SignalR/statuses/8a91ccea42237d5d392084293a34dc51dbe511b1","head":{"label":"aspnet:dygray/handshake_versioning","ref":"dygray/handshake_versioning","sha":"8a91ccea42237d5d392084293a34dc51dbe511b1","user":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":71159589,"node_id":"MDEwOlJlcG9zaXRvcnk3MTE1OTU4OQ==","name":"SignalR","full_name":"aspnet/SignalR","owner":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/SignalR","description":"Incredibly simple real-time web for ASP.NET Core","fork":false,"url":"https://api.github.com/repos/aspnet/SignalR","forks_url":"https://api.github.com/repos/aspnet/SignalR/forks","keys_url":"https://api.github.com/repos/aspnet/SignalR/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/SignalR/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/SignalR/teams","hooks_url":"https://api.github.com/repos/aspnet/SignalR/hooks","issue_events_url":"https://api.github.com/repos/aspnet/SignalR/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/SignalR/events","assignees_url":"https://api.github.com/repos/aspnet/SignalR/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/SignalR/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/SignalR/tags","blobs_url":"https://api.github.com/repos/aspnet/SignalR/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/SignalR/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/SignalR/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/SignalR/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/SignalR/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/SignalR/languages","stargazers_url":"https://api.github.com/repos/aspnet/SignalR/stargazers","contributors_url":"https://api.github.com/repos/aspnet/SignalR/contributors","subscribers_url":"https://api.github.com/repos/aspnet/SignalR/subscribers","subscription_url":"https://api.github.com/repos/aspnet/SignalR/subscription","commits_url":"https://api.github.com/repos/aspnet/SignalR/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/SignalR/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/SignalR/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/SignalR/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/SignalR/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/SignalR/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/SignalR/merges","archive_url":"https://api.github.com/repos/aspnet/SignalR/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/SignalR/downloads","issues_url":"https://api.github.com/repos/aspnet/SignalR/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/SignalR/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/SignalR/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/SignalR/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/SignalR/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/SignalR/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/SignalR/deployments","created_at":"2016-10-17T16:39:15Z","updated_at":"2018-06-20T13:18:11Z","pushed_at":"2018-06-20T23:49:44Z","git_url":"git://github.com/aspnet/SignalR.git","ssh_url":"git@github.com:aspnet/SignalR.git","clone_url":"https://github.com/aspnet/SignalR.git","svn_url":"https://github.com/aspnet/SignalR","homepage":null,"size":9506,"stargazers_count":1905,"watchers_count":1905,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":330,"mirror_url":null,"archived":false,"open_issues_count":113,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":330,"open_issues":113,"watchers":1905,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"8a69fb7f51452a956ab611a7a9d33ce1373e2cf8","user":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":71159589,"node_id":"MDEwOlJlcG9zaXRvcnk3MTE1OTU4OQ==","name":"SignalR","full_name":"aspnet/SignalR","owner":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/SignalR","description":"Incredibly simple real-time web for ASP.NET Core","fork":false,"url":"https://api.github.com/repos/aspnet/SignalR","forks_url":"https://api.github.com/repos/aspnet/SignalR/forks","keys_url":"https://api.github.com/repos/aspnet/SignalR/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/SignalR/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/SignalR/teams","hooks_url":"https://api.github.com/repos/aspnet/SignalR/hooks","issue_events_url":"https://api.github.com/repos/aspnet/SignalR/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/SignalR/events","assignees_url":"https://api.github.com/repos/aspnet/SignalR/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/SignalR/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/SignalR/tags","blobs_url":"https://api.github.com/repos/aspnet/SignalR/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/SignalR/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/SignalR/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/SignalR/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/SignalR/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/SignalR/languages","stargazers_url":"https://api.github.com/repos/aspnet/SignalR/stargazers","contributors_url":"https://api.github.com/repos/aspnet/SignalR/contributors","subscribers_url":"https://api.github.com/repos/aspnet/SignalR/subscribers","subscription_url":"https://api.github.com/repos/aspnet/SignalR/subscription","commits_url":"https://api.github.com/repos/aspnet/SignalR/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/SignalR/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/SignalR/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/SignalR/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/SignalR/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/SignalR/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/SignalR/merges","archive_url":"https://api.github.com/repos/aspnet/SignalR/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/SignalR/downloads","issues_url":"https://api.github.com/repos/aspnet/SignalR/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/SignalR/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/SignalR/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/SignalR/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/SignalR/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/SignalR/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/SignalR/deployments","created_at":"2016-10-17T16:39:15Z","updated_at":"2018-06-20T13:18:11Z","pushed_at":"2018-06-20T23:49:44Z","git_url":"git://github.com/aspnet/SignalR.git","ssh_url":"git@github.com:aspnet/SignalR.git","clone_url":"https://github.com/aspnet/SignalR.git","svn_url":"https://github.com/aspnet/SignalR","homepage":null,"size":9506,"stargazers_count":1905,"watchers_count":1905,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":330,"mirror_url":null,"archived":false,"open_issues_count":113,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":330,"open_issues":113,"watchers":1905,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/SignalR/pulls/2520"},"html":{"href":"https://github.com/aspnet/SignalR/pull/2520"},"issue":{"href":"https://api.github.com/repos/aspnet/SignalR/issues/2520"},"comments":{"href":"https://api.github.com/repos/aspnet/SignalR/issues/2520/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/SignalR/pulls/2520/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/SignalR/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/SignalR/pulls/2520/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/SignalR/statuses/8a91ccea42237d5d392084293a34dc51dbe511b1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"JamesNK"}}