Open lazydino opened 9 years ago
The short answer is "I'm not sure and depends on how you implement it".
The longest answers are:
simudup
is based on a browser portage of the buffer
Node.js module. At the time it was compiled with browserify, SimUDP.js
embedded a previous version (but don't know which one) of @toots's portage (https://github.com/toots/buffer-browserify). You should check that this module did support binary data and how.buffer
portage in browserify has evolved towards an other implementation with newer browserify versions. Given that this new implementation leverage browser's Uint8Array
, it might better support binary data. If you feel adventurous, you can try to compile SimUDP.js
with that new portage and give it a try.simudup
uses Buffer#toString, so whatever buffer
portage is used, if you are looking for efficiency, you might need to tweak that. Hi, I am re-visiting this repository and try the three lines proxy server provided in ReadMe, but node came back with the following message.
if(server instanceof sio.Manager)
^
TypeError: Expecting a function in instanceof check, but got #
Can you help? I did not have the right version of socket.io? All I did is just install package via npm and run var server = require('http').createServer();
require('simudp').listen(server);
server.listen(8080);
Arrff.. i'm sorry about that. It's an old module I wrote years ago and that I don't maintain anymore. It is probably very dusty..
I was able to get rid of this issue by commenting the culprit lines in ./lib/server.js
, but haven't investigate further:
exports.listen = function(server, options) {
options = options || {};
var io;
// if(server instanceof sio.Manager)
// io = server;
// else
io = sio.listen(server, options['socket.io'] || {});
new Proxy(io.of('/simudp'), options.port_range, options.whoami);
//..
(I'm running node v0.12.1, I checkouted the repo and ran npm install .
)
It might work like that, but not sure.
Sorry again.
I just change the socket.io package verion requirement from ">0.9.11" to "^0.9.12", SimUDP will then work with the older socket.io
Hi, is simudp capable of handling binary data? Can I transmit and receive byte array?