nospaceships / node-raw-socket

Raw sockets for Node.js.
206 stars 69 forks source link

generateChecksums option doesn't work for me #63

Open JoakimCh opened 4 years ago

JoakimCh commented 4 years ago

Edit: I see that this was intentionally removed... The doc is not updated though. Removed in commit: e66bd326405bcb5b9535555f7330795c48257eba

const socket = rawSocket.createSocket({
  protocol: rawSocket.Protocol.ICMP,
  generateChecksums: true, // this doesn't write anything
  checksumOffset: 2
})
// this one works though
rawSocket.writeChecksum(packet, 2, rawSocket.createChecksum(packet))

If more info needed then let me know.

stephenwvickers commented 4 years ago

Yes, I see, sorry for that. I will get that updated in the next release.

unreleased commented 4 years ago

@stephenwvickers Is there any chance of getting some TCP examples too <3