Created
January 4, 2011 19:51
-
-
Save troufster/765290 to your computer and use it in GitHub Desktop.
Dead simple buffering
This file contains hidden or 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
| //Buffering bison "packets" before websockets to remove overhead | |
| var bison = require('./bison'); | |
| var o1 = { name : "sven", nested : { boolzor : true } }; | |
| var o2 = { name : "rolf" }; | |
| var buf = []; | |
| buf.push(o1); | |
| buf.push(o2); | |
| var enc = bison.encode(buf); | |
| console.log(enc); | |
| var dec = bison.decode(enc); | |
| console.log(dec); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment