lib/toxdns.js
function(opts) {
  if(!opts) opts = {};
  var libpath = opts['path'];
  var key = opts['key'];

  this._library = this._createLibrary(libpath);
  this._initKey(key);
  this._initHandle(this._key);
}
function(opts) {
  if(!opts) opts = {};
  var libpath = opts['path'];
  var key = opts['key'];

  this._library = this._createLibrary(libpath);
  this._initKey(key);
  this._initHandle(this._key);
}
function ( opts ) { if ( ! opts ) opts = { } ; var libpath = opts [ 'path' ] ; var key = opts [ 'key' ] ; this . _library = this . _createLibrary ( libpath ) ; this . _initKey ( key ) ; this . _initHandle ( this . _key ) ; }
Creates a ToxDns instance.
@class
@param {Object} [opts] Options
@param {String} [opts.path] Path to libtoxdns.so
@param {(Buffer|String)} [opts.key] Public key of ToxDns3 service
Creates a ToxDns instance .