{"action":"created","comment":{"url":"https://api.github.com/repos/gnuradio/gnuradio/pulls/comments/81465463","pull_request_review_id":2445284,"id":81465463,"diff_hunk":"@@ -57,6 +57,11 @@ namespace gr {\n        */\n       static sptr make(size_t itemsize, size_t vlen, char *address,\n                        int timeout=100, bool pass_tags=false, int hwm=-1);\n+\n+      /*!\n+       * \\brief If the endpoint is TCP return the port number; -1 otherwise.\n+       */\n+      virtual int port() = 0;","path":"gr-zeromq/include/gnuradio/zeromq/pub_sink.h","position":null,"original_position":8,"commit_id":"5cc6295af10899d1e27f6225c536b8371b8155ff","original_commit_id":"a1e916779cb8e928d9626eb7b5ed01d27cfaf041","user":{"login":"smunaut","id":129013,"avatar_url":"https://avatars.githubusercontent.com/u/129013?v=3","gravatar_id":"","url":"https://api.github.com/users/smunaut","html_url":"https://github.com/smunaut","followers_url":"https://api.github.com/users/smunaut/followers","following_url":"https://api.github.com/users/smunaut/following{/other_user}","gists_url":"https://api.github.com/users/smunaut/gists{/gist_id}","starred_url":"https://api.github.com/users/smunaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smunaut/subscriptions","organizations_url":"https://api.github.com/users/smunaut/orgs","repos_url":"https://api.github.com/users/smunaut/repos","events_url":"https://api.github.com/users/smunaut/events{/privacy}","received_events_url":"https://api.github.com/users/smunaut/received_events","type":"User","site_admin":false},"body":"Currently most of the common implementation code wouldn't have been applicable to the message ones basically ... so it didn't make sense to use the same base class for stream vs message.\r\n\r\nAnd making it a 3 level   base_impl <- base_{stream,message}_impl <- {pub,sub,..}_stream_impl    would have been quite useless because base_impl ended up being empty of any code.\r\n\r\nSo I opted to just do a separate base class for the stream and left the message ones for someone else to refactor.\r\n","created_at":"2016-10-02T07:02:27Z","updated_at":"2016-10-02T07:02:27Z","html_url":"https://github.com/gnuradio/gnuradio/pull/1038#discussion_r81465463","pull_request_url":"https://api.github.com/repos/gnuradio/gnuradio/pulls/1038","_links":{"self":{"href":"https://api.github.com/repos/gnuradio/gnuradio/pulls/comments/81465463"},"html":{"href":"https://github.com/gnuradio/gnuradio/pull/1038#discussion_r81465463"},"pull_request":{"href":"https://api.github.com/repos/gnuradio/gnuradio/pulls/1038"}}},"pull_request":{"url":"https://api.github.com/repos/gnuradio/gnuradio/pulls/1038","id":87204233,"html_url":"https://github.com/gnuradio/gnuradio/pull/1038","diff_url":"https://github.com/gnuradio/gnuradio/pull/1038.diff","patch_url":"https://github.com/gnuradio/gnuradio/pull/1038.patch","issue_url":"https://api.github.com/repos/gnuradio/gnuradio/issues/1038","number":1038,"state":"open","locked":false,"title":"zeromq: add port getter for streaming zmq blocks","user":{"login":"n-west","id":1879306,"avatar_url":"https://avatars.githubusercontent.com/u/1879306?v=3","gravatar_id":"","url":"https://api.github.com/users/n-west","html_url":"https://github.com/n-west","followers_url":"https://api.github.com/users/n-west/followers","following_url":"https://api.github.com/users/n-west/following{/other_user}","gists_url":"https://api.github.com/users/n-west/gists{/gist_id}","starred_url":"https://api.github.com/users/n-west/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n-west/subscriptions","organizations_url":"https://api.github.com/users/n-west/orgs","repos_url":"https://api.github.com/users/n-west/repos","events_url":"https://api.github.com/users/n-west/events{/privacy}","received_events_url":"https://api.github.com/users/n-west/received_events","type":"User","site_admin":false},"body":"Add a port getter/accessor that parses the zmq endpoint. If it is\r\ntcp, then parse out the port and return as an integer. New QA tests\r\n\r\n * the port accessor with a known port\r\n * the loopback test for pubsub that already exists, but uses\r\n    an ephermeral port for the sink that is read back for the source\r\n    to attach to\r\n\r\n\r\n---\r\nCurrent issue that I have with this is that it requires some string parsing and that the message blocks don't inherit from base_{source,sink}_impl so they don't get the feature. Also, we might want to make this more generic as an endpoint() accessor and force users of it to parse the port on their own. That's a design choice I don't have strong feelings on since I only care about the port and this makes it easier for me although it is less generic and potentially more error prone due to string parsing.","created_at":"2016-09-28T21:22:19Z","updated_at":"2016-10-02T07:02:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"254eac5853c7fc76004b500c821f551ae4296e2a","assignee":{"login":"jmcorgan","id":1492956,"avatar_url":"https://avatars.githubusercontent.com/u/1492956?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcorgan","html_url":"https://github.com/jmcorgan","followers_url":"https://api.github.com/users/jmcorgan/followers","following_url":"https://api.github.com/users/jmcorgan/following{/other_user}","gists_url":"https://api.github.com/users/jmcorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcorgan/subscriptions","organizations_url":"https://api.github.com/users/jmcorgan/orgs","repos_url":"https://api.github.com/users/jmcorgan/repos","events_url":"https://api.github.com/users/jmcorgan/events{/privacy}","received_events_url":"https://api.github.com/users/jmcorgan/received_events","type":"User","site_admin":false},"assignees":[{"login":"jmcorgan","id":1492956,"avatar_url":"https://avatars.githubusercontent.com/u/1492956?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcorgan","html_url":"https://github.com/jmcorgan","followers_url":"https://api.github.com/users/jmcorgan/followers","following_url":"https://api.github.com/users/jmcorgan/following{/other_user}","gists_url":"https://api.github.com/users/jmcorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcorgan/subscriptions","organizations_url":"https://api.github.com/users/jmcorgan/orgs","repos_url":"https://api.github.com/users/jmcorgan/repos","events_url":"https://api.github.com/users/jmcorgan/events{/privacy}","received_events_url":"https://api.github.com/users/jmcorgan/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/gnuradio/gnuradio/pulls/1038/commits","review_comments_url":"https://api.github.com/repos/gnuradio/gnuradio/pulls/1038/comments","review_comment_url":"https://api.github.com/repos/gnuradio/gnuradio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gnuradio/gnuradio/issues/1038/comments","statuses_url":"https://api.github.com/repos/gnuradio/gnuradio/statuses/5cc6295af10899d1e27f6225c536b8371b8155ff","head":{"label":"n-west:zmq-port-getter","ref":"zmq-port-getter","sha":"5cc6295af10899d1e27f6225c536b8371b8155ff","user":{"login":"n-west","id":1879306,"avatar_url":"https://avatars.githubusercontent.com/u/1879306?v=3","gravatar_id":"","url":"https://api.github.com/users/n-west","html_url":"https://github.com/n-west","followers_url":"https://api.github.com/users/n-west/followers","following_url":"https://api.github.com/users/n-west/following{/other_user}","gists_url":"https://api.github.com/users/n-west/gists{/gist_id}","starred_url":"https://api.github.com/users/n-west/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n-west/subscriptions","organizations_url":"https://api.github.com/users/n-west/orgs","repos_url":"https://api.github.com/users/n-west/repos","events_url":"https://api.github.com/users/n-west/events{/privacy}","received_events_url":"https://api.github.com/users/n-west/received_events","type":"User","site_admin":false},"repo":{"id":11678788,"name":"gnuradio","full_name":"n-west/gnuradio","owner":{"login":"n-west","id":1879306,"avatar_url":"https://avatars.githubusercontent.com/u/1879306?v=3","gravatar_id":"","url":"https://api.github.com/users/n-west","html_url":"https://github.com/n-west","followers_url":"https://api.github.com/users/n-west/followers","following_url":"https://api.github.com/users/n-west/following{/other_user}","gists_url":"https://api.github.com/users/n-west/gists{/gist_id}","starred_url":"https://api.github.com/users/n-west/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n-west/subscriptions","organizations_url":"https://api.github.com/users/n-west/orgs","repos_url":"https://api.github.com/users/n-west/repos","events_url":"https://api.github.com/users/n-west/events{/privacy}","received_events_url":"https://api.github.com/users/n-west/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/n-west/gnuradio","description":"GNU Radio","fork":true,"url":"https://api.github.com/repos/n-west/gnuradio","forks_url":"https://api.github.com/repos/n-west/gnuradio/forks","keys_url":"https://api.github.com/repos/n-west/gnuradio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/n-west/gnuradio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/n-west/gnuradio/teams","hooks_url":"https://api.github.com/repos/n-west/gnuradio/hooks","issue_events_url":"https://api.github.com/repos/n-west/gnuradio/issues/events{/number}","events_url":"https://api.github.com/repos/n-west/gnuradio/events","assignees_url":"https://api.github.com/repos/n-west/gnuradio/assignees{/user}","branches_url":"https://api.github.com/repos/n-west/gnuradio/branches{/branch}","tags_url":"https://api.github.com/repos/n-west/gnuradio/tags","blobs_url":"https://api.github.com/repos/n-west/gnuradio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/n-west/gnuradio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/n-west/gnuradio/git/refs{/sha}","trees_url":"https://api.github.com/repos/n-west/gnuradio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/n-west/gnuradio/statuses/{sha}","languages_url":"https://api.github.com/repos/n-west/gnuradio/languages","stargazers_url":"https://api.github.com/repos/n-west/gnuradio/stargazers","contributors_url":"https://api.github.com/repos/n-west/gnuradio/contributors","subscribers_url":"https://api.github.com/repos/n-west/gnuradio/subscribers","subscription_url":"https://api.github.com/repos/n-west/gnuradio/subscription","commits_url":"https://api.github.com/repos/n-west/gnuradio/commits{/sha}","git_commits_url":"https://api.github.com/repos/n-west/gnuradio/git/commits{/sha}","comments_url":"https://api.github.com/repos/n-west/gnuradio/comments{/number}","issue_comment_url":"https://api.github.com/repos/n-west/gnuradio/issues/comments{/number}","contents_url":"https://api.github.com/repos/n-west/gnuradio/contents/{+path}","compare_url":"https://api.github.com/repos/n-west/gnuradio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/n-west/gnuradio/merges","archive_url":"https://api.github.com/repos/n-west/gnuradio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/n-west/gnuradio/downloads","issues_url":"https://api.github.com/repos/n-west/gnuradio/issues{/number}","pulls_url":"https://api.github.com/repos/n-west/gnuradio/pulls{/number}","milestones_url":"https://api.github.com/repos/n-west/gnuradio/milestones{/number}","notifications_url":"https://api.github.com/repos/n-west/gnuradio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/n-west/gnuradio/labels{/name}","releases_url":"https://api.github.com/repos/n-west/gnuradio/releases{/id}","deployments_url":"https://api.github.com/repos/n-west/gnuradio/deployments","created_at":"2013-07-26T05:58:58Z","updated_at":"2014-08-27T20:12:05Z","pushed_at":"2016-09-29T22:44:23Z","git_url":"git://github.com/n-west/gnuradio.git","ssh_url":"git@github.com:n-west/gnuradio.git","clone_url":"https://github.com/n-west/gnuradio.git","svn_url":"https://github.com/n-west/gnuradio","homepage":"gnuradio.org","size":46922,"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":"maint"}},"base":{"label":"gnuradio:master","ref":"master","sha":"9e11c519b55d65bfcedfa5324c75bf7f268c9dbc","user":{"login":"gnuradio","id":1278659,"avatar_url":"https://avatars.githubusercontent.com/u/1278659?v=3","gravatar_id":"","url":"https://api.github.com/users/gnuradio","html_url":"https://github.com/gnuradio","followers_url":"https://api.github.com/users/gnuradio/followers","following_url":"https://api.github.com/users/gnuradio/following{/other_user}","gists_url":"https://api.github.com/users/gnuradio/gists{/gist_id}","starred_url":"https://api.github.com/users/gnuradio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnuradio/subscriptions","organizations_url":"https://api.github.com/users/gnuradio/orgs","repos_url":"https://api.github.com/users/gnuradio/repos","events_url":"https://api.github.com/users/gnuradio/events{/privacy}","received_events_url":"https://api.github.com/users/gnuradio/received_events","type":"Organization","site_admin":false},"repo":{"id":3030065,"name":"gnuradio","full_name":"gnuradio/gnuradio","owner":{"login":"gnuradio","id":1278659,"avatar_url":"https://avatars.githubusercontent.com/u/1278659?v=3","gravatar_id":"","url":"https://api.github.com/users/gnuradio","html_url":"https://github.com/gnuradio","followers_url":"https://api.github.com/users/gnuradio/followers","following_url":"https://api.github.com/users/gnuradio/following{/other_user}","gists_url":"https://api.github.com/users/gnuradio/gists{/gist_id}","starred_url":"https://api.github.com/users/gnuradio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnuradio/subscriptions","organizations_url":"https://api.github.com/users/gnuradio/orgs","repos_url":"https://api.github.com/users/gnuradio/repos","events_url":"https://api.github.com/users/gnuradio/events{/privacy}","received_events_url":"https://api.github.com/users/gnuradio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gnuradio/gnuradio","description":"GNU Radio","fork":false,"url":"https://api.github.com/repos/gnuradio/gnuradio","forks_url":"https://api.github.com/repos/gnuradio/gnuradio/forks","keys_url":"https://api.github.com/repos/gnuradio/gnuradio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gnuradio/gnuradio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gnuradio/gnuradio/teams","hooks_url":"https://api.github.com/repos/gnuradio/gnuradio/hooks","issue_events_url":"https://api.github.com/repos/gnuradio/gnuradio/issues/events{/number}","events_url":"https://api.github.com/repos/gnuradio/gnuradio/events","assignees_url":"https://api.github.com/repos/gnuradio/gnuradio/assignees{/user}","branches_url":"https://api.github.com/repos/gnuradio/gnuradio/branches{/branch}","tags_url":"https://api.github.com/repos/gnuradio/gnuradio/tags","blobs_url":"https://api.github.com/repos/gnuradio/gnuradio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gnuradio/gnuradio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gnuradio/gnuradio/git/refs{/sha}","trees_url":"https://api.github.com/repos/gnuradio/gnuradio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gnuradio/gnuradio/statuses/{sha}","languages_url":"https://api.github.com/repos/gnuradio/gnuradio/languages","stargazers_url":"https://api.github.com/repos/gnuradio/gnuradio/stargazers","contributors_url":"https://api.github.com/repos/gnuradio/gnuradio/contributors","subscribers_url":"https://api.github.com/repos/gnuradio/gnuradio/subscribers","subscription_url":"https://api.github.com/repos/gnuradio/gnuradio/subscription","commits_url":"https://api.github.com/repos/gnuradio/gnuradio/commits{/sha}","git_commits_url":"https://api.github.com/repos/gnuradio/gnuradio/git/commits{/sha}","comments_url":"https://api.github.com/repos/gnuradio/gnuradio/comments{/number}","issue_comment_url":"https://api.github.com/repos/gnuradio/gnuradio/issues/comments{/number}","contents_url":"https://api.github.com/repos/gnuradio/gnuradio/contents/{+path}","compare_url":"https://api.github.com/repos/gnuradio/gnuradio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gnuradio/gnuradio/merges","archive_url":"https://api.github.com/repos/gnuradio/gnuradio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gnuradio/gnuradio/downloads","issues_url":"https://api.github.com/repos/gnuradio/gnuradio/issues{/number}","pulls_url":"https://api.github.com/repos/gnuradio/gnuradio/pulls{/number}","milestones_url":"https://api.github.com/repos/gnuradio/gnuradio/milestones{/number}","notifications_url":"https://api.github.com/repos/gnuradio/gnuradio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gnuradio/gnuradio/labels{/name}","releases_url":"https://api.github.com/repos/gnuradio/gnuradio/releases{/id}","deployments_url":"https://api.github.com/repos/gnuradio/gnuradio/deployments","created_at":"2011-12-21T22:05:37Z","updated_at":"2016-10-02T00:47:58Z","pushed_at":"2016-10-01T08:03:41Z","git_url":"git://github.com/gnuradio/gnuradio.git","ssh_url":"git@github.com:gnuradio/gnuradio.git","clone_url":"https://github.com/gnuradio/gnuradio.git","svn_url":"https://github.com/gnuradio/gnuradio","homepage":"gnuradio.org","size":56119,"stargazers_count":530,"watchers_count":530,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":489,"mirror_url":null,"open_issues_count":70,"forks":489,"open_issues":70,"watchers":530,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gnuradio/gnuradio/pulls/1038"},"html":{"href":"https://github.com/gnuradio/gnuradio/pull/1038"},"issue":{"href":"https://api.github.com/repos/gnuradio/gnuradio/issues/1038"},"comments":{"href":"https://api.github.com/repos/gnuradio/gnuradio/issues/1038/comments"},"review_comments":{"href":"https://api.github.com/repos/gnuradio/gnuradio/pulls/1038/comments"},"review_comment":{"href":"https://api.github.com/repos/gnuradio/gnuradio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gnuradio/gnuradio/pulls/1038/commits"},"statuses":{"href":"https://api.github.com/repos/gnuradio/gnuradio/statuses/5cc6295af10899d1e27f6225c536b8371b8155ff"}}}}
{"actor":{"display_login":"smunaut"}}