{"action":"created","comment":{"url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/comments/29691884","id":29691884,"diff_hunk":"@@ -0,0 +1,36 @@\n+var nano = require('..');\n+var test = require('tape');\n+\n+test('pipe a thousand msgs between incompatible socket types', function(t){\n+\n+  var sent = 0, recv = 0;\n+\n+  var pub = nano.socket('pub', { tcpnodelay: true });\n+  var sub = nano.socket('sub', { tcpnodelay: true });\n+\n+  var push = nano.socket('push');\n+  var pull = nano.socket('pull');\n+  pull.setEncoding('utf8'); //should also be able to do in `socket(type, opts)`","path":"test/streams.js","position":13,"original_position":13,"commit_id":"e6af67a7a98389ede4ff2cb231156d6b191478fd","original_commit_id":"e6af67a7a98389ede4ff2cb231156d6b191478fd","user":{"login":"reqshark","id":937826,"avatar_url":"https://avatars.githubusercontent.com/u/937826?v=3","gravatar_id":"","url":"https://api.github.com/users/reqshark","html_url":"https://github.com/reqshark","followers_url":"https://api.github.com/users/reqshark/followers","following_url":"https://api.github.com/users/reqshark/following{/other_user}","gists_url":"https://api.github.com/users/reqshark/gists{/gist_id}","starred_url":"https://api.github.com/users/reqshark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reqshark/subscriptions","organizations_url":"https://api.github.com/users/reqshark/orgs","repos_url":"https://api.github.com/users/reqshark/repos","events_url":"https://api.github.com/users/reqshark/events{/privacy}","received_events_url":"https://api.github.com/users/reqshark/received_events","type":"User","site_admin":false},"body":"stream default is a buffer, yes.\r\n\r\nWith node streams, we have a different way of asking the lib to return back a string. before everything node-nanomsg returned was a buffer","created_at":"2015-05-05T17:28:43Z","updated_at":"2015-05-05T17:28:43Z","html_url":"https://github.com/nickdesaulniers/node-nanomsg/pull/53#discussion_r29691884","pull_request_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/comments/29691884"},"html":{"href":"https://github.com/nickdesaulniers/node-nanomsg/pull/53#discussion_r29691884"},"pull_request":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/53","id":29960424,"html_url":"https://github.com/nickdesaulniers/node-nanomsg/pull/53","diff_url":"https://github.com/nickdesaulniers/node-nanomsg/pull/53.diff","patch_url":"https://github.com/nickdesaulniers/node-nanomsg/pull/53.patch","issue_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/53","number":53,"state":"open","locked":false,"title":"nanomsg streams: subclass Socket stream from Duplex base class","user":{"login":"reqshark","id":937826,"avatar_url":"https://avatars.githubusercontent.com/u/937826?v=3","gravatar_id":"","url":"https://api.github.com/users/reqshark","html_url":"https://github.com/reqshark","followers_url":"https://api.github.com/users/reqshark/followers","following_url":"https://api.github.com/users/reqshark/following{/other_user}","gists_url":"https://api.github.com/users/reqshark/gists{/gist_id}","starred_url":"https://api.github.com/users/reqshark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reqshark/subscriptions","organizations_url":"https://api.github.com/users/reqshark/orgs","repos_url":"https://api.github.com/users/reqshark/repos","events_url":"https://api.github.com/users/reqshark/events{/privacy}","received_events_url":"https://api.github.com/users/reqshark/received_events","type":"User","site_admin":false},"body":"PR builds directly on @tcr efforts, leveraging initial work and direction taken in https://github.com/nickdesaulniers/node-nanomsg/pull/30: \r\n* the Readable Stream's `_read(n){}` implementation is no different here.\r\n* furthers #29, implementing a `Writeable`\r\n\r\n#### other notable characteristics:\r\n* revised program interface for all send and receive operations\r\n* removes EventEmitter\r\n* new API:\r\n  - full blown Duplex interface: Writeable and Readable streams\r\n  - from `.on('message', callback)` to `.on('data', callback)`\r\n  - pipe all endpoints together from chainable  `pipe()` methods\r\n  - socket’s `pipe()` method is essentially a flexible `zmq_proxy()` or `nn_device()`\r\n  - io.js streams are domain, protocol, and transport agnostic\r\n  - combine sockets in new ways and connect modules like [websocket stream](https://github.com/maxogden/websocket-stream)","created_at":"2015-02-25T04:29:06Z","updated_at":"2015-05-05T17:28:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"97e196186c02dcde2b0c274060a16a3618771923","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/53/commits","review_comments_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/53/comments","review_comment_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/53/comments","statuses_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/statuses/e6af67a7a98389ede4ff2cb231156d6b191478fd","head":{"label":"nickdesaulniers:streams","ref":"streams","sha":"e6af67a7a98389ede4ff2cb231156d6b191478fd","user":{"login":"nickdesaulniers","id":1823839,"avatar_url":"https://avatars.githubusercontent.com/u/1823839?v=3","gravatar_id":"","url":"https://api.github.com/users/nickdesaulniers","html_url":"https://github.com/nickdesaulniers","followers_url":"https://api.github.com/users/nickdesaulniers/followers","following_url":"https://api.github.com/users/nickdesaulniers/following{/other_user}","gists_url":"https://api.github.com/users/nickdesaulniers/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdesaulniers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdesaulniers/subscriptions","organizations_url":"https://api.github.com/users/nickdesaulniers/orgs","repos_url":"https://api.github.com/users/nickdesaulniers/repos","events_url":"https://api.github.com/users/nickdesaulniers/events{/privacy}","received_events_url":"https://api.github.com/users/nickdesaulniers/received_events","type":"User","site_admin":false},"repo":{"id":12425564,"name":"node-nanomsg","full_name":"nickdesaulniers/node-nanomsg","owner":{"login":"nickdesaulniers","id":1823839,"avatar_url":"https://avatars.githubusercontent.com/u/1823839?v=3","gravatar_id":"","url":"https://api.github.com/users/nickdesaulniers","html_url":"https://github.com/nickdesaulniers","followers_url":"https://api.github.com/users/nickdesaulniers/followers","following_url":"https://api.github.com/users/nickdesaulniers/following{/other_user}","gists_url":"https://api.github.com/users/nickdesaulniers/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdesaulniers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdesaulniers/subscriptions","organizations_url":"https://api.github.com/users/nickdesaulniers/orgs","repos_url":"https://api.github.com/users/nickdesaulniers/repos","events_url":"https://api.github.com/users/nickdesaulniers/events{/privacy}","received_events_url":"https://api.github.com/users/nickdesaulniers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nickdesaulniers/node-nanomsg","description":"Node.js binding for nanomsg","fork":false,"url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg","forks_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/forks","keys_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/teams","hooks_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/hooks","issue_events_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/events{/number}","events_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/events","assignees_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/assignees{/user}","branches_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/branches{/branch}","tags_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/tags","blobs_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/refs{/sha}","trees_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/statuses/{sha}","languages_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/languages","stargazers_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/stargazers","contributors_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/contributors","subscribers_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/subscribers","subscription_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/subscription","commits_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/commits{/sha}","git_commits_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/commits{/sha}","comments_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/comments{/number}","issue_comment_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/comments{/number}","contents_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/contents/{+path}","compare_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/merges","archive_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/downloads","issues_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues{/number}","pulls_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls{/number}","milestones_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/milestones{/number}","notifications_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/labels{/name}","releases_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/releases{/id}","created_at":"2013-08-28T05:39:48Z","updated_at":"2015-05-05T11:26:16Z","pushed_at":"2015-04-15T08:23:05Z","git_url":"git://github.com/nickdesaulniers/node-nanomsg.git","ssh_url":"git@github.com:nickdesaulniers/node-nanomsg.git","clone_url":"https://github.com/nickdesaulniers/node-nanomsg.git","svn_url":"https://github.com/nickdesaulniers/node-nanomsg","homepage":null,"size":2574,"stargazers_count":123,"watchers_count":123,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":16,"forks":15,"open_issues":16,"watchers":123,"default_branch":"master"}},"base":{"label":"nickdesaulniers:master","ref":"master","sha":"f08bdd09aee5ebafe1afbc98f231c70866fdcc04","user":{"login":"nickdesaulniers","id":1823839,"avatar_url":"https://avatars.githubusercontent.com/u/1823839?v=3","gravatar_id":"","url":"https://api.github.com/users/nickdesaulniers","html_url":"https://github.com/nickdesaulniers","followers_url":"https://api.github.com/users/nickdesaulniers/followers","following_url":"https://api.github.com/users/nickdesaulniers/following{/other_user}","gists_url":"https://api.github.com/users/nickdesaulniers/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdesaulniers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdesaulniers/subscriptions","organizations_url":"https://api.github.com/users/nickdesaulniers/orgs","repos_url":"https://api.github.com/users/nickdesaulniers/repos","events_url":"https://api.github.com/users/nickdesaulniers/events{/privacy}","received_events_url":"https://api.github.com/users/nickdesaulniers/received_events","type":"User","site_admin":false},"repo":{"id":12425564,"name":"node-nanomsg","full_name":"nickdesaulniers/node-nanomsg","owner":{"login":"nickdesaulniers","id":1823839,"avatar_url":"https://avatars.githubusercontent.com/u/1823839?v=3","gravatar_id":"","url":"https://api.github.com/users/nickdesaulniers","html_url":"https://github.com/nickdesaulniers","followers_url":"https://api.github.com/users/nickdesaulniers/followers","following_url":"https://api.github.com/users/nickdesaulniers/following{/other_user}","gists_url":"https://api.github.com/users/nickdesaulniers/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdesaulniers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdesaulniers/subscriptions","organizations_url":"https://api.github.com/users/nickdesaulniers/orgs","repos_url":"https://api.github.com/users/nickdesaulniers/repos","events_url":"https://api.github.com/users/nickdesaulniers/events{/privacy}","received_events_url":"https://api.github.com/users/nickdesaulniers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nickdesaulniers/node-nanomsg","description":"Node.js binding for nanomsg","fork":false,"url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg","forks_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/forks","keys_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/teams","hooks_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/hooks","issue_events_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/events{/number}","events_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/events","assignees_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/assignees{/user}","branches_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/branches{/branch}","tags_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/tags","blobs_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/refs{/sha}","trees_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/statuses/{sha}","languages_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/languages","stargazers_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/stargazers","contributors_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/contributors","subscribers_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/subscribers","subscription_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/subscription","commits_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/commits{/sha}","git_commits_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/commits{/sha}","comments_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/comments{/number}","issue_comment_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/comments{/number}","contents_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/contents/{+path}","compare_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/merges","archive_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/downloads","issues_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues{/number}","pulls_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls{/number}","milestones_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/milestones{/number}","notifications_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/labels{/name}","releases_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/releases{/id}","created_at":"2013-08-28T05:39:48Z","updated_at":"2015-05-05T11:26:16Z","pushed_at":"2015-04-15T08:23:05Z","git_url":"git://github.com/nickdesaulniers/node-nanomsg.git","ssh_url":"git@github.com:nickdesaulniers/node-nanomsg.git","clone_url":"https://github.com/nickdesaulniers/node-nanomsg.git","svn_url":"https://github.com/nickdesaulniers/node-nanomsg","homepage":null,"size":2574,"stargazers_count":123,"watchers_count":123,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":16,"forks":15,"open_issues":16,"watchers":123,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/53"},"html":{"href":"https://github.com/nickdesaulniers/node-nanomsg/pull/53"},"issue":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/53"},"comments":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/statuses/e6af67a7a98389ede4ff2cb231156d6b191478fd"}}}}