Skip to content

Instantly share code, notes, and snippets.

@hnry
Created September 23, 2016 05:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hnry/aede7e357bb38cc635b1d1cb177b725f to your computer and use it in GitHub Desktop.
Save hnry/aede7e357bb38cc635b1d1cb177b725f to your computer and use it in GitHub Desktop.
const buf = Buffer.alloc(65537) // 64 * 1024 = 65536 (+ 1 to go over)
const net = require("net")
net.createServer((client) => {
client.on("data", (data) => {
console.log("server receiving data")
})
}).listen(5000)
const client = net.connect(5000, "localhost", () => {
console.log("client connected")
client.write(buf)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment