Permalink
Browse files

Changed ref to util module instead of sys

  • Loading branch information...
1 parent d1febd9 commit 17a952df549d496e8d7afcb6d565cfdf9581bacf @stefounet committed May 6, 2012
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/ndns.js
View
@@ -1,9 +1,9 @@
-var sys = require('sys');
+var util = require('util');
var debug;
var debugLevel = parseInt(process.env.NODE_DEBUG, 16);
if(debugLevel & 0x4) {
- debug = function (x) { sys.error('NDNS: ' + x); };
+ debug = function (x) { util.error('NDNS: ' + x); };
} else {
debug = function () { };
}
@@ -1959,7 +1959,7 @@ function Message (socket, rinfo) {
this.q = new MessageObject();
this.rr = new MessageObject();
}
-sys.inherits(Message, events.EventEmitter);
+util.inherits(Message, events.EventEmitter);
exports.Message = Message;
Message.prototype.addRR = function (name, ttl, className, typeName) {
@@ -2005,14 +2005,14 @@ Message.prototype.addQuestion = function (name, typeName, className) {
function IncomingMessage (socket, rinfo) {
Message.call(this, socket, rinfo);
};
-sys.inherits(IncomingMessage, Message);
+util.inherits(IncomingMessage, Message);
exports.IncomingMessage = IncomingMessage;
function OutgoingMessage (socket, rinfo) {
Message.call(this, socket, rinfo);
this.maxSend = 512;
}
-sys.inherits(OutgoingMessage, Message);
+util.inherits(OutgoingMessage, Message);
exports.OutgoingMessage = OutgoingMessage;
OutgoingMessage.prototype._Buffer = new Buffer(ns_maxmsg);
@@ -2045,7 +2045,7 @@ OutgoingMessage.prototype.send = function (message) {
function ServerResponse (req) {
OutgoingMessage.call(this, req.socket, req.rinfo);
}
-sys.inherits(ServerResponse, OutgoingMessage);
+util.inherits(ServerResponse, OutgoingMessage);
exports.ServerResponse = ServerResponse;
function ClientRequest(client, socket, port, host) {
@@ -2057,7 +2057,7 @@ function ClientRequest(client, socket, port, host) {
this.port = port;
this.host = host;
}
-sys.inherits(ClientRequest, OutgoingMessage);
+util.inherits(ClientRequest, OutgoingMessage);
exports.ClientRequest = ClientRequest;
ClientRequest.prototype.send = function (message) {
@@ -2091,7 +2091,7 @@ function Server(type, requestListener) {
this.on("message", messageListener);
};
-sys.inherits(Server, dgram.Socket);
+util.inherits(Server, dgram.Socket);
exports.Server = Server;
Server.prototype._Parser = parsers.alloc();
@@ -2141,7 +2141,7 @@ function Client(type, responseListener) {
this.on("message", clientMessageListener);
this.bind();
}
-sys.inherits(Client, dgram.Socket);
+util.inherits(Client, dgram.Socket);
exports.Client = Client;
Client.prototype.request = function (port, host) {

0 comments on commit 17a952d

Please sign in to comment.