Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
inspect tcp traffic
var stream = createStream()
net.createServer(function (con) {
con.on('data', function (data) {
console.log('S <- ' + data.toString())
})
stream.on('data', function (data) {
console.log('S -> ' + data.toString())
})
stream.pipe(con).pipe(stream)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.