Skip to content

Commit

Permalink
Changed ref to util module instead of sys
Browse files Browse the repository at this point in the history
  • Loading branch information
stefounet committed May 6, 2012
1 parent d1febd9 commit 17a952d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/ndns.js
Original file line number Diff line number Diff line change
@@ -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 () { };
}
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 17a952d

Please sign in to comment.