CIRCDCC.addHost Member

Syntax

object.addHost(host, auth);

Arguments

ArgumentSummary
host
auth

Returns

Remarks

See Also

Source Code

function dcc_addhost(host, auth)
{
var me = this;
var listener = {
onLookupComplete: function _onLookupComplete(request, record, status) {
// record == null if it failed. We can't do anything with a failure.
if (record)
{
while (record.hasMore())
me.addIP(record.getNextAddrAsString(), auth);
}
}
};
try {
var th;
if (jsenv.HAS_THREAD_MANAGER) {
th = getService("@mozilla.org/thread-manager;1").currentThread;
} else {
const EQS = getService("@mozilla.org/event-queue-service;1",
"nsIEventQueueService");
th = EQS.getSpecialEventQueue(EQS.CURRENT_THREAD_EVENT_QUEUE);
}
var dnsRecord = this._dnsSvc.asyncResolve(host, false, listener, th);
} catch (ex) {
dd("Error resolving host to IP: " + ex);
}
}