code: function(opts) {
    if(!opts) opts = {};
    var libpath = opts['path'];
    var createAV = (opts['av'] !== undefined ? opts['av'] : true);
  
    var toxOptions = this._createOptions(opts['ipv6'], opts['udp'], opts['proxy']);
  
    this.toxcore = this.createCoreLibrary(libpath);
    this.loaded = false;
    this._emitter = new events.EventEmitter();
  
    // doSync loop interval, used in #start(), #stop(), #isStarted()
    this._interval = undefined;
  
    // If createAV, auto-create a ToxAV object
    if(createAV) {
      // If { 'av': { ... } }, then pass createAV as ToxAV options object
      if(_.isObject(createAV)) {
        this._toxav = new ToxAV(this, createAV);
      } else { // If { 'av': true }, then don't pass an options object (default options)
        this._toxav = new ToxAV(this);
      }
    }
  
    // Better fix for node-ffi gc issue
    this._ffiCallbacks = {};
  
    this._initHandle(toxOptions); // Initialize handle via tox_new
    this._initCallbacks();
  }
docs: Creates a Tox instance and provides wrapper methods for functions
  described in <tox/tox.h>.
  @class
  @param {Object}           opts      Options
  @param {String}           opts.path Path to libtoxcore shared object
  @param {(Boolean|Object)} [opts.av=true] Whether or not to create an
  internal ToxAV object. If passed as an object,
  will pass the object as ToxAV's opts parameter
  @param {Boolean}          [opts.ipv6=false] Whether or not to enable
  ipv6 communication.
  @param {Boolean}          [opts.udp=true] Whether or not to enable UDP.
  @param {(Object|String)}  opts.proxy
  @param {String}           opts.proxy.type
  @param {String}           opts.proxy.address
  @param {Number}           opts.proxy.port