{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/DotNetty/pulls/comments/115110007","pull_request_review_id":36633967,"id":115110007,"diff_hunk":"@@ -67,7 +69,17 @@ protected override void Dispose(bool disposing)\n \n         public override long Seek(long offset, SeekOrigin origin)\n         {\n-            throw new NotSupportedException();\n+            if (origin == SeekOrigin.Current)\n+            {\n+                offset += this.Position;\n+            }\n+            else if (origin == SeekOrigin.End)\n+            {\n+                offset += this.buffer.Capacity;","path":"src/DotNetty.Buffers/ReadOnlyByteBufferStream.cs","position":43,"original_position":43,"commit_id":"e1ec98b5e6d965c83a628bd989fba58ddc90729e","original_commit_id":"e1ec98b5e6d965c83a628bd989fba58ddc90729e","user":{"login":"nayato","id":818017,"avatar_url":"https://avatars3.githubusercontent.com/u/818017?v=3","gravatar_id":"","url":"https://api.github.com/users/nayato","html_url":"https://github.com/nayato","followers_url":"https://api.github.com/users/nayato/followers","following_url":"https://api.github.com/users/nayato/following{/other_user}","gists_url":"https://api.github.com/users/nayato/gists{/gist_id}","starred_url":"https://api.github.com/users/nayato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nayato/subscriptions","organizations_url":"https://api.github.com/users/nayato/orgs","repos_url":"https://api.github.com/users/nayato/repos","events_url":"https://api.github.com/users/nayato/events{/privacy}","received_events_url":"https://api.github.com/users/nayato/received_events","type":"User","site_admin":false},"body":"should be `offset += this.buffer.WriterIndex;` as we consider WriterIndex the end of readable space","created_at":"2017-05-06T01:25:08Z","updated_at":"2017-05-06T01:25:08Z","html_url":"https://github.com/Azure/DotNetty/pull/247#discussion_r115110007","pull_request_url":"https://api.github.com/repos/Azure/DotNetty/pulls/247","_links":{"self":{"href":"https://api.github.com/repos/Azure/DotNetty/pulls/comments/115110007"},"html":{"href":"https://github.com/Azure/DotNetty/pull/247#discussion_r115110007"},"pull_request":{"href":"https://api.github.com/repos/Azure/DotNetty/pulls/247"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/DotNetty/pulls/247","id":119087969,"html_url":"https://github.com/Azure/DotNetty/pull/247","diff_url":"https://github.com/Azure/DotNetty/pull/247.diff","patch_url":"https://github.com/Azure/DotNetty/pull/247.patch","issue_url":"https://api.github.com/repos/Azure/DotNetty/issues/247","number":247,"state":"open","locked":false,"title":"Make ReadOnlyByteBufferStream seekable","user":{"login":"damonbarry","id":9042469,"avatar_url":"https://avatars3.githubusercontent.com/u/9042469?v=3","gravatar_id":"","url":"https://api.github.com/users/damonbarry","html_url":"https://github.com/damonbarry","followers_url":"https://api.github.com/users/damonbarry/followers","following_url":"https://api.github.com/users/damonbarry/following{/other_user}","gists_url":"https://api.github.com/users/damonbarry/gists{/gist_id}","starred_url":"https://api.github.com/users/damonbarry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damonbarry/subscriptions","organizations_url":"https://api.github.com/users/damonbarry/orgs","repos_url":"https://api.github.com/users/damonbarry/repos","events_url":"https://api.github.com/users/damonbarry/events{/privacy}","received_events_url":"https://api.github.com/users/damonbarry/received_events","type":"User","site_admin":false},"body":"The [Protocol Gateway](https://github.com/Azure/azure-iot-protocol-gateway) uses ReadOnlyByteBufferStream to create an IotHubClientMessage. The IoTHub device SDK then calls .Length on the underlying stream, which is a problem because ReadOnlyByteBufferStream isn't currently seekable. The device SDK will be updated to call CanSeek() first, but it would also be good to add seekable support to ReadOnlyByteBufferStream.","created_at":"2017-05-04T23:36:16Z","updated_at":"2017-05-06T01:25:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e893a36af9c3c4ba6f875e841d8aed7b7b231f3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/DotNetty/pulls/247/commits","review_comments_url":"https://api.github.com/repos/Azure/DotNetty/pulls/247/comments","review_comment_url":"https://api.github.com/repos/Azure/DotNetty/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/DotNetty/issues/247/comments","statuses_url":"https://api.github.com/repos/Azure/DotNetty/statuses/e1ec98b5e6d965c83a628bd989fba58ddc90729e","head":{"label":"damonbarry:make-seekable","ref":"make-seekable","sha":"e1ec98b5e6d965c83a628bd989fba58ddc90729e","user":{"login":"damonbarry","id":9042469,"avatar_url":"https://avatars3.githubusercontent.com/u/9042469?v=3","gravatar_id":"","url":"https://api.github.com/users/damonbarry","html_url":"https://github.com/damonbarry","followers_url":"https://api.github.com/users/damonbarry/followers","following_url":"https://api.github.com/users/damonbarry/following{/other_user}","gists_url":"https://api.github.com/users/damonbarry/gists{/gist_id}","starred_url":"https://api.github.com/users/damonbarry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damonbarry/subscriptions","organizations_url":"https://api.github.com/users/damonbarry/orgs","repos_url":"https://api.github.com/users/damonbarry/repos","events_url":"https://api.github.com/users/damonbarry/events{/privacy}","received_events_url":"https://api.github.com/users/damonbarry/received_events","type":"User","site_admin":false},"repo":{"id":89759494,"name":"DotNetty","full_name":"damonbarry/DotNetty","owner":{"login":"damonbarry","id":9042469,"avatar_url":"https://avatars3.githubusercontent.com/u/9042469?v=3","gravatar_id":"","url":"https://api.github.com/users/damonbarry","html_url":"https://github.com/damonbarry","followers_url":"https://api.github.com/users/damonbarry/followers","following_url":"https://api.github.com/users/damonbarry/following{/other_user}","gists_url":"https://api.github.com/users/damonbarry/gists{/gist_id}","starred_url":"https://api.github.com/users/damonbarry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damonbarry/subscriptions","organizations_url":"https://api.github.com/users/damonbarry/orgs","repos_url":"https://api.github.com/users/damonbarry/repos","events_url":"https://api.github.com/users/damonbarry/events{/privacy}","received_events_url":"https://api.github.com/users/damonbarry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/damonbarry/DotNetty","description":"DotNetty project – a port of netty, event-driven asynchronous network application framework","fork":true,"url":"https://api.github.com/repos/damonbarry/DotNetty","forks_url":"https://api.github.com/repos/damonbarry/DotNetty/forks","keys_url":"https://api.github.com/repos/damonbarry/DotNetty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/damonbarry/DotNetty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/damonbarry/DotNetty/teams","hooks_url":"https://api.github.com/repos/damonbarry/DotNetty/hooks","issue_events_url":"https://api.github.com/repos/damonbarry/DotNetty/issues/events{/number}","events_url":"https://api.github.com/repos/damonbarry/DotNetty/events","assignees_url":"https://api.github.com/repos/damonbarry/DotNetty/assignees{/user}","branches_url":"https://api.github.com/repos/damonbarry/DotNetty/branches{/branch}","tags_url":"https://api.github.com/repos/damonbarry/DotNetty/tags","blobs_url":"https://api.github.com/repos/damonbarry/DotNetty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/damonbarry/DotNetty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/damonbarry/DotNetty/git/refs{/sha}","trees_url":"https://api.github.com/repos/damonbarry/DotNetty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/damonbarry/DotNetty/statuses/{sha}","languages_url":"https://api.github.com/repos/damonbarry/DotNetty/languages","stargazers_url":"https://api.github.com/repos/damonbarry/DotNetty/stargazers","contributors_url":"https://api.github.com/repos/damonbarry/DotNetty/contributors","subscribers_url":"https://api.github.com/repos/damonbarry/DotNetty/subscribers","subscription_url":"https://api.github.com/repos/damonbarry/DotNetty/subscription","commits_url":"https://api.github.com/repos/damonbarry/DotNetty/commits{/sha}","git_commits_url":"https://api.github.com/repos/damonbarry/DotNetty/git/commits{/sha}","comments_url":"https://api.github.com/repos/damonbarry/DotNetty/comments{/number}","issue_comment_url":"https://api.github.com/repos/damonbarry/DotNetty/issues/comments{/number}","contents_url":"https://api.github.com/repos/damonbarry/DotNetty/contents/{+path}","compare_url":"https://api.github.com/repos/damonbarry/DotNetty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/damonbarry/DotNetty/merges","archive_url":"https://api.github.com/repos/damonbarry/DotNetty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/damonbarry/DotNetty/downloads","issues_url":"https://api.github.com/repos/damonbarry/DotNetty/issues{/number}","pulls_url":"https://api.github.com/repos/damonbarry/DotNetty/pulls{/number}","milestones_url":"https://api.github.com/repos/damonbarry/DotNetty/milestones{/number}","notifications_url":"https://api.github.com/repos/damonbarry/DotNetty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/damonbarry/DotNetty/labels{/name}","releases_url":"https://api.github.com/repos/damonbarry/DotNetty/releases{/id}","deployments_url":"https://api.github.com/repos/damonbarry/DotNetty/deployments","created_at":"2017-04-29T02:45:21Z","updated_at":"2017-04-29T02:45:23Z","pushed_at":"2017-05-05T18:51:41Z","git_url":"git://github.com/damonbarry/DotNetty.git","ssh_url":"git@github.com:damonbarry/DotNetty.git","clone_url":"https://github.com/damonbarry/DotNetty.git","svn_url":"https://github.com/damonbarry/DotNetty","homepage":"","size":1246,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"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":"dev"}},"base":{"label":"Azure:dev","ref":"dev","sha":"3ef7b618f90b7833fc474f4824aed43e4124c563","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars3.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":35290377,"name":"DotNetty","full_name":"Azure/DotNetty","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars3.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/DotNetty","description":"DotNetty project – a port of netty, event-driven asynchronous network application framework","fork":false,"url":"https://api.github.com/repos/Azure/DotNetty","forks_url":"https://api.github.com/repos/Azure/DotNetty/forks","keys_url":"https://api.github.com/repos/Azure/DotNetty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/DotNetty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/DotNetty/teams","hooks_url":"https://api.github.com/repos/Azure/DotNetty/hooks","issue_events_url":"https://api.github.com/repos/Azure/DotNetty/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/DotNetty/events","assignees_url":"https://api.github.com/repos/Azure/DotNetty/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/DotNetty/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/DotNetty/tags","blobs_url":"https://api.github.com/repos/Azure/DotNetty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/DotNetty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/DotNetty/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/DotNetty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/DotNetty/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/DotNetty/languages","stargazers_url":"https://api.github.com/repos/Azure/DotNetty/stargazers","contributors_url":"https://api.github.com/repos/Azure/DotNetty/contributors","subscribers_url":"https://api.github.com/repos/Azure/DotNetty/subscribers","subscription_url":"https://api.github.com/repos/Azure/DotNetty/subscription","commits_url":"https://api.github.com/repos/Azure/DotNetty/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/DotNetty/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/DotNetty/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/DotNetty/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/DotNetty/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/DotNetty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/DotNetty/merges","archive_url":"https://api.github.com/repos/Azure/DotNetty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/DotNetty/downloads","issues_url":"https://api.github.com/repos/Azure/DotNetty/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/DotNetty/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/DotNetty/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/DotNetty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/DotNetty/labels{/name}","releases_url":"https://api.github.com/repos/Azure/DotNetty/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/DotNetty/deployments","created_at":"2015-05-08T16:41:53Z","updated_at":"2017-05-05T18:38:05Z","pushed_at":"2017-05-05T18:51:42Z","git_url":"git://github.com/Azure/DotNetty.git","ssh_url":"git@github.com:Azure/DotNetty.git","clone_url":"https://github.com/Azure/DotNetty.git","svn_url":"https://github.com/Azure/DotNetty","homepage":"","size":1236,"stargazers_count":835,"watchers_count":835,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":226,"mirror_url":null,"open_issues_count":38,"forks":226,"open_issues":38,"watchers":835,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/DotNetty/pulls/247"},"html":{"href":"https://github.com/Azure/DotNetty/pull/247"},"issue":{"href":"https://api.github.com/repos/Azure/DotNetty/issues/247"},"comments":{"href":"https://api.github.com/repos/Azure/DotNetty/issues/247/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/DotNetty/pulls/247/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/DotNetty/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/DotNetty/pulls/247/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/DotNetty/statuses/e1ec98b5e6d965c83a628bd989fba58ddc90729e"}}}}
{"actor":{"display_login":"nayato"}}