Title: stream: socket.setEncoding(null) to receive binary Buffers rather than strings has no effect · Issue #6038 · nodejs/node · GitHub
Open Graph Title: stream: socket.setEncoding(null) to receive binary Buffers rather than strings has no effect · Issue #6038 · nodejs/node
X Title: stream: socket.setEncoding(null) to receive binary Buffers rather than strings has no effect · Issue #6038 · nodejs/node
Description: Version: v5.8.0 Platform: Darwin 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64 Subsystem: stream I've tried node 5.8.0, 5.10.0 and 4.4.2. I always receive string objects in ...
Open Graph Description: Version: v5.8.0 Platform: Darwin 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64 Subsystem: stream I've tried node 5.8.0, 5.10.0 and 4....
X Description: Version: v5.8.0 Platform: Darwin 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64 Subsystem: stream I've tried node 5.8.0, 5.10.0 an...
Opengraph URL: https://github.com/nodejs/node/issues/6038
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"stream: socket.setEncoding(null) to receive binary Buffers rather than strings has no effect","articleBody":"- **Version**: v5.8.0\n- **Platform**: Darwin 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64\n- **Subsystem**: stream\n\nI've tried node 5.8.0, 5.10.0 and 4.4.2. I always receive string objects in my data handler unless I manually remove the decoder from the socket readableState:\n\n```\nconst server = net.createServer( ( c ) =\u003e {\n\n // See https://nodejs.org/api/stream.html#stream_readable_setencoding_encoding\n c.setEncoding( null );\n\n // Hack that must be added to make this work as expected\n delete c._readableState.decoder;\n\n c.on( 'data', ( d ) =\u003e {\n\n // Expect 'object' but get 'string' without deleting the decoder manually\n console.log( typeof d );\n } );\n\n} );\n```\n","author":{"url":"https://github.com/inversion","@type":"Person","name":"inversion"},"datePublished":"2016-04-04T11:15:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":26},"url":"https://github.com/6038/node/issues/6038"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:423f17b2-fbb8-2158-3f54-2798600655fb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B2FA:37ACD:48199AD:643391F:6A4F6AF6 |
| html-safe-nonce | f5a2ea13bc7d561d0a5b500eed01203ada55aaafefaf103f75ac5924c45e9a58 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkZBOjM3QUNEOjQ4MTk5QUQ6NjQzMzkxRjo2QTRGNkFGNiIsInZpc2l0b3JfaWQiOiI3NjQ2Mjg5NTcxMTUyMzU4MTM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e0b1f2b0dc6f36878b2bd76af5b7d41e905c355ce9d12e1c1ce84194903736d0 |
| hovercard-subject-tag | issue:145654139 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/6038/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0e39e876d10f1dd7ffd2f2fe4f66145f460e813762316e0c7c1fbc0aa76c42f3/nodejs/node/issues/6038 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0e39e876d10f1dd7ffd2f2fe4f66145f460e813762316e0c7c1fbc0aa76c42f3/nodejs/node/issues/6038 |
| og:image:alt | Version: v5.8.0 Platform: Darwin 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64 Subsystem: stream I've tried node 5.8.0, 5.10.0 and 4.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | inversion |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width