Skip to content

Commit

Permalink
switched \u**** to \x** for single byte writes, as the former doesn't…
Browse files Browse the repository at this point in the history
… really make any sense
  • Loading branch information
einaros committed Aug 30, 2011
1 parent 63fc15d commit ae7f253
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/transports/websocket/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ WebSocket.prototype.write = function (data) {
var length = Buffer.byteLength(data)
, buffer = new Buffer(2 + length);

buffer.write('\u0000', 'binary');
buffer.write('\x00', 'binary');
buffer.write(data, 1, 'utf8');
buffer.write('\uffff', 1 + length, 'binary');
buffer.write('\xff', 1 + length, 'binary');

try {
if (this.socket.write(buffer)) {
Expand Down

0 comments on commit ae7f253

Please sign in to comment.