Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created October 6, 2011 19:35
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 bnoordhuis/3a654fe9fac6535c27dd to your computer and use it in GitHub Desktop.
Save bnoordhuis/3a654fe9fac6535c27dd to your computer and use it in GitHub Desktop.
--- a/test/pummel/test-net-write-callbacks.js
+++ b/test/pummel/test-net-write-callbacks.js
@@ -41,9 +41,10 @@ var server = net.Server(function(socket) {
server.listen(common.PORT, function() {
var client = net.createConnection(common.PORT);
+ var b = Buffer('hello world');
client.on('connect', function() {
for (var i = 0; i < N; i++) {
- client.write('hello world', function() {
+ client.write(b, function() {
cbcount++;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment