Skip to content

Hi! I fixed some calls to "sys" for you! #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions vendor/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var http = require('http');
var https = require('https');
var net = require('net');
var urllib = require('url');
var sys = require('sys');
var util = require('util');

var FRAME_NO = 0;
var FRAME_LO = 1;
Expand All @@ -52,7 +52,7 @@ var CLOSED = 3;

var debugLevel = parseInt(process.env.NODE_DEBUG, 16);
var debug = (debugLevel & 0x4) ?
function() { sys.error.apply(this, arguments); } :
function() { util.error.apply(this, arguments); } :
function() { };

// Generate a Sec-WebSocket-* value
Expand Down Expand Up @@ -246,7 +246,7 @@ var WebSocket = function(url, proto, opts) {

// FRAME_LO
function(buf, off) {
debug('frame_lo(' + sys.inspect(buf) + ', ' + off + ')');
debug('frame_lo(' + util.inspect(buf) + ', ' + off + ')');

// Find the first instance of 0xff, our terminating byte
for (var i = off; i < buf.length && buf[i] != 0xff; i++)
Expand Down Expand Up @@ -306,7 +306,7 @@ var WebSocket = function(url, proto, opts) {

// FRAME_HI
function(buf, off) {
debug('frame_hi(' + sys.inspect(buf) + ', ' + off + ')');
debug('frame_hi(' + util.inspect(buf) + ', ' + off + ')');

if (buf[off] !== 0) {
throw new Error('High-byte framing not supported.');
Expand All @@ -323,7 +323,7 @@ var WebSocket = function(url, proto, opts) {
return;
}

debug('dataListener(' + sys.inspect(buf) + ')');
debug('dataListener(' + util.inspect(buf) + ')');

var off = 0;
var consumed = 0;
Expand Down Expand Up @@ -624,7 +624,7 @@ var WebSocket = function(url, proto, opts) {
httpReq.end();
})();
};
sys.inherits(WebSocket, events.EventEmitter);
util.inherits(WebSocket, events.EventEmitter);
exports.WebSocket = WebSocket;

// Add some constants to the WebSocket object
Expand Down