Title: dgram `socket.send()` documentation needs clarification · Issue #5124 · nodejs/node · GitHub
Open Graph Title: dgram `socket.send()` documentation needs clarification · Issue #5124 · nodejs/node
X Title: dgram `socket.send()` documentation needs clarification · Issue #5124 · nodejs/node
Description: In the version of the dgram doc that is current as of this writing, the first argument (buf) is described initially as: Buffer object, string, or an array of either. Message to be sent. However, it is subsequently described as a Buffer o...
Open Graph Description: In the version of the dgram doc that is current as of this writing, the first argument (buf) is described initially as: Buffer object, string, or an array of either. Message to be sent. However, it...
X Description: In the version of the dgram doc that is current as of this writing, the first argument (buf) is described initially as: Buffer object, string, or an array of either. Message to be sent. However, it...
Opengraph URL: https://github.com/nodejs/node/issues/5124
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"dgram `socket.send()` documentation needs clarification","articleBody":"In [the version of the `dgram` doc that is current as of this writing](https://github.com/nodejs/node/blob/6e3bccbc03ffbdf0420f4802b5d992bc27bc5b0f/doc/api/dgram.markdown), the first argument (`buf`) is described initially as:\n\n\u003e Buffer object, string, or an array of either. Message to be sent.\n\nHowever, it is subsequently described as a Buffer object only:\n\n\u003e The `buf` argument is a [`Buffer`] object containing the message. The `offset`\n\u003e and `length` specify the offset within the `Buffer` where the message begins\n\u003e and the number of bytes in the message, respectively. With messages that\n\u003e contain multi-byte characters, `offset` and `length` will be calculated with\n\u003e respect to [byte length][] and not the character position.\n\nAdditionally, it is not clear what `offset` and `length` mean when the `buf` argument is an array. It's also not clear if the multi-byte caveat applies if `buf` is a string or only if `buf` is a Buffer object.\n\nIt may be worth changing the name from `buf` to `msg` or something like that.\n\n/cc @nodejs/documentation \n","author":{"url":"https://github.com/Trott","@type":"Person","name":"Trott"},"datePublished":"2016-02-06T21:25:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/5124/node/issues/5124"}
| 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:daa52c6b-fece-5222-cc0e-20476c986038 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FEA:71B10:EBA2F4:1444B5E:6A4DD33D |
| html-safe-nonce | d495cae6a8fa9bd3c59c3131f76aa5f89ce3dda34365308051cc8eb4b1c89552 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkVBOjcxQjEwOkVCQTJGNDoxNDQ0QjVFOjZBNEREMzNEIiwidmlzaXRvcl9pZCI6IjExNzk2MzI4MTg1MzcyMjI5NzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9fa4cd45ac553bba1a99495543de19be68ca8b16dd7183600f1701b3d4f3ecd9 |
| hovercard-subject-tag | issue:131901398 |
| 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/5124/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3dd3c7783c5d0d1621919bc7208213a17e5579be77194ac3a3f31211fda175ba/nodejs/node/issues/5124 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3dd3c7783c5d0d1621919bc7208213a17e5579be77194ac3a3f31211fda175ba/nodejs/node/issues/5124 |
| og:image:alt | In the version of the dgram doc that is current as of this writing, the first argument (buf) is described initially as: Buffer object, string, or an array of either. Message to be sent. However, it... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Trott |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| 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 | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width