We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how can I get Packet to write into a buffer of the exact length that is needed? for instance, now I do:
buf = new Buffer(1024) # too big Packet.write(buf, pre) server.send(buf, 0, buf.length, 53, ns) buf = null
but I think that ends up sending too large packets in most cases. Is there a way to get the "buf" to the correct length before sending?
The text was updated successfully, but these errors were encountered:
Packet.write() returns a length which you can use:
var len = Packet.write(buf, pre)
Then use len in send():
server.send(buf, 0, len , 53, ns)
Sorry, something went wrong.
No branches or pull requests
how can I get Packet to write into a buffer of the exact length that is needed?
for instance, now I do:
but I think that ends up sending too large packets in most cases.
Is there a way to get the "buf" to the correct length before sending?
The text was updated successfully, but these errors were encountered: