From dbe140c1173cbb55b77aa959aca39b64cee3738a Mon Sep 17 00:00:00 2001 From: Tony Kovanen Date: Mon, 20 Jan 2014 10:49:20 +0200 Subject: [PATCH] Binary support --- README.md | 11 +- lib/server.js | 1 + lib/transports/flashsocket.js | 6 ++ lib/transports/polling-jsonp.js | 8 ++ lib/transports/polling-xhr.js | 18 +++- lib/transports/polling.js | 21 ++-- lib/transports/websocket.js | 6 ++ test/jsonp.js | 21 ++++ test/server.js | 180 +++++++++++++++++++++++++++++++- 9 files changed, 258 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 3b3d3ae47..43f7b1875 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ var engine = require('engine.io') server.on('connection', function (socket) { socket.send('utf 8 string'); + socket.send(new Buffer([0, 1, 2, 3, 4, 5])); // binary data }); ``` @@ -60,7 +61,10 @@ httpServer.on('request', function (req, res) {