LearnBoost/websocket.io — Issue #21: Method writeUInt16BE missing in Node 0.4
Author: nicokaiser
Created: 2012-02-27 12:59:41+00:00
State: open

I'm trying to run a websocket.io server on Node 0.4 (as Node 0.6 still leaks consiberable amouts of memory). However when trying to send data to a hybi-16 client, the server crashes:

TypeError: Object �~{"event":"article","data":{...}}} has no method 'writeUInt16BE'
at WebSocket.frame (/Users/nkaiser/Sites/applications/services/webpush/node_modules/websocket.io/lib/protocols/hybi-16.js:205:20)
at WebSocket.write (/Users/nkaiser/Sites/applications/services/webpush/node_modules/websocket.io/lib/protocols/hybi-16.js:150:20)
at WebSocket.send (/Users/nkaiser/Sites/applications/services/webpush/node_modules/websocket.io/lib/socket.js:104:8)
at sendObject (/Users/nkaiser/Sites/applications/services/webpush/lib/webpush-wsio.js:656:8)
at [object Object]._broadcast (/Users/nkaiser/Sites/applications/services/webpush/lib/webpush-wsio.js:432:9)
at Array. (/Users/nkaiser/Sites/applications/services/webpush/lib/webpush-wsio.js:402:10)
at EventEmitter._tickCallback (node.js:126:26)

Seems like writeUInt16BE is missing in Node 0.4.
Is there a way to workaround this?