You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nodejs
The documentation on socket.write says that it queues all of the data
in kernel or user memory, but empirically it seems to be keeping a
reference to my buffer object I pass in so that if I make a change
after calling socket.write it may end up sending the changed data and
not what was passed to socket.write. Is this a bug, or expected
behavior and simply unclear documentation?
Ben Noordhuis
unread,
Feb 3, 2012, 6:27:48 PM2/3/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Node maintains the reference to prevent the GC from reclaiming your buffer while the write is in progress. Don't touch the buffer again until your write callback is called.