Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #25 from takano32/master

The "sys" module is now called "util".
  • Loading branch information...
commit aa7852177a24a3037018ed42d297d3ce1f3c37bc 2 parents aebfec9 + 3d85cad
@indexzero indexzero authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/websocket.js
View
12 lib/websocket.js
@@ -5,7 +5,7 @@ var events = require('events');
var http = require('http');
var net = require('net');
var urllib = require('url');
-var sys = require('sys');
+var util = require('util');
var FRAME_NO = 0;
var FRAME_LO = 1;
@@ -19,7 +19,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
@@ -223,7 +223,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++)
@@ -283,7 +283,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.');
@@ -300,7 +300,7 @@ var WebSocket = function(url, proto, opts) {
return;
}
- debug('dataListener(' + sys.inspect(buf) + ')');
+ debug('dataListener(' + util.inspect(buf) + ')');
var off = 0;
var consumed = 0;
@@ -587,7 +587,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
Please sign in to comment.
Something went wrong with that request. Please try again.