Created
October 12, 2012 07:43
-
-
Save phillro/3877832 to your computer and use it in GitHub Desktop.
pub cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conn.send(" V2"); | |
var cmd = new Buffer("PUB test\n"); | |
var body = new Buffer('hello world.'); | |
var size = new Buffer(4) | |
size.writeInt16BE(body.length,0) | |
var msg = Buffer.concat([cmd, body,size]); | |
conn.send(msg); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment