The server-side emitter equivalent.
321693
function ServerChannel(server, opts) {
  opts = opts || {};
  events.EventEmitter.call(this);

  this.server = server;
  this._endWritable = !!utils.getOption(opts, 'endWritable', true);
  this._prefix = normalizedPrefix(opts.scope);

  var cache = server._cache;
  var svc = server.service;
  var hash = svc.hash;
  if (!cache[hash]) {
    // Add the channel's protocol to the cache if it isn't already there. This
    // will save a handshake the first time on channels with the same protocol.
    cache[hash] = new Adapter(svc, svc, hash);
  }
  this._adapter = null;

  this.destroyed = false;
  this.draining = false;
  this.pending = 0;
  this.once('_eot', function (pending, err) {
    debug('server channel EOT');
    this.emit('eot', pending, err);
  });
}
967454
public final void cmpsd(XMMRegister dst, XMMRegister src, Immediate imm8)
  {
    emitX86(INST_CMPSD, dst, src, imm8);
  }
475857
@JRubyMethod(optional = 1, frame = true)
    public static IRubyObject emit(IRubyObject self, IRubyObject[] _oid, Block proc) {
        Ruby runtime = self.getRuntime();
        int level = RubyNumeric.fix2int((IRubyObject)((RubyObject)self).fastGetInstanceVariable("@level")) + 1;
        ((RubyObject)self).fastSetInstanceVariable("@level", runtime.newFixnum(level));
        ThreadContext ctx = runtime.getCurrentContext();
        Emitter emitter = (Emitter)self.dataGetStructChecked();
        Extra bonus = (Extra)emitter.bonus;

        IRubyObject oid = _oid.length == 0 ? runtime.getNil() : _oid[0];
            
        bonus.oid = oid;
        IRubyObject symple;
        if(!oid.isNil() && bonus.data.callMethod(ctx, "has_key?", oid).isTrue()) {
            symple = ((RubyHash)bonus.data).op_aref(ctx, oid);
        } else {
            symple = proc.yield(ctx, (IRubyObject)((RubyObject)self).fastGetInstanceVariable("@out"));
        }
        emitter.markNode(symple);

        level--;
        ((RubyObject)self).fastSetInstanceVariable("@level", runtime.newFixnum(level));
        if(level == 0) {
            emitter.emit(symple);
            emitter.flush(0);
            return bonus.port;
        }
        return symple;
    }
73247
function createEventTracker (emitter) {
  const events = []
  return {
    on (event, fn) {
      events.push([ event, fn ])
      return emitter.on(event, fn)
    },
    remove () {
      events.forEach(([ event, fn ]) => {
        emitter.off(event, fn)
      })
    }
  }
}
512228
function emit (route, req, res) {
    assert.equal(typeof route, 'string')
    assert.ok(req, 'no req specified')

    if (!req._ssa) {
      assert.ok(res, 'no res specified')
    }

    // handle server init
    if (isReq(req) && isRes(res)) {
      const ssa = createSsa({}, req, res)
      const dft = { node: { cb: [ router._default ] } }
      return router(route, ssa, dft)
    }

    // handle subrouter
    const params = req
    const parentDefault = res
    router(route, params, parentDefault)
  }
131877
def wscall(self, method, query=None, callback=None):
        """"""
        if callback is None:
            self.sock.emit(method, query)
        else:
            self.sock.emitack(method, query, callback)
357278
function Server(/* [options], [connectionListener] */) {
    events.EventEmitter.call(this);
    var self = this;

    var options;
    if (typeof arguments[0] === 'function') {
        options = {};
        this.on('connection', arguments[0]);
    } else {
        options = arguments[0] || {};
        if (typeof arguments[1] === 'function') {
            this.on('connection', arguments[1]);
        }
    }

    this._server = net.createServer(options, this._handler.bind(this));
    this._server.on('listening', function () {
        self.emit('listening');
    })
    this._server.on('close', function () {
        self.emit('close');
    })
    this._server.on('error', function (e) {
        self.emit('error', e);
    });
}
1181639
function getLatency(emitter) {
    var start = Date.now();

    return emitter.request('time')
        .then(function (timestamp) {
          var end = Date.now();
          var latency = (end - start) / 2;
          var time = timestamp + latency;

          // apply the first ever retrieved offset immediately.
          if (isFirst) {
            isFirst = false;
            emitter.emit('change', time);
          }

          return latency;
        })
  }
758223
function EventEmitter(isAsync) {
        if (isAsync === void 0) { isAsync = false; }
        var _this = _super.call(this) || this;
        _this.__isAsync = isAsync;
        return _this;
    }
579090
function generateOutput(source) {
    return __awaiter(this, void 0, void 0, function () {
        var isCached, artifact, compiled, artifact, _a;
        return __generator(this, function (_b) {
            switch (_b.label) {
                case 0: return [4 /*yield*/, caching.has(source.codeHash)];
                case 1:
                    isCached = _b.sent();
                    if (!isCached) return [3 /*break*/, 3];
                    return [4 /*yield*/, caching.get(source.codeHash)];
                case 2:
                    artifact = _b.sent();
                    return [2 /*return*/, artifact];
                case 3: return [4 /*yield*/, solc_install_1.installVersion(source.solcVersion)];
                case 4:
                    _b.sent();
                    return [4 /*yield*/, compile_1.default(source)];
                case 5:
                    compiled = _b.sent();
                    _a = {
                        compiled: compiled
                    };
                    return [4 /*yield*/, output_files_1.createJavascriptFile(source, compiled)];
                case 6:
                    _a.javascript = _b.sent();
                    return [4 /*yield*/, output_files_1.createTypescriptFile(source, compiled)];
                case 7:
                    artifact = (_a.typescript = _b.sent(),
                        _a);
                    return [4 /*yield*/, caching.set(source.codeHash, artifact)];
                case 8:
                    _b.sent();
                    return [2 /*return*/, artifact];
            }
        });
    });
}
1226141
def server(addr):
        """"""
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        sock.bind(addr)
        sock.listen(1)
        conn, addr = sock.accept()
        talk = SocketTalk(conn)
        return talk
1212154
function wrapCreateServer (original) {
    return function wrappedCreateServer (options, handler) {
      var server = original.apply(this, arguments)
      shimmer.wrap(server.constructor.prototype, 'emit', wrapEmit)
      wrappedCreateServer[symbols.unwrap]()
      return server
    }
  }
1150467
public final void pextrd(Register dst, XMMRegister src, Immediate imm8)
  {
    emitX86(INST_PEXTRD, dst, src, imm8);
  }
1349144
function createServer() {
  function app(req, res, next) {
    app.handle(req, res, next);
  }
  app.method = '*';
  merge(app, proto);
  merge(app, EventEmitter.prototype);
  app.stack = [];
  app.params = [];
  app._cachedEvents = [] ;
  app.routedMethods = {} ;
  app.locals = Object.create(null);
  for (var i = 0; i < arguments.length; ++i) {
    app.use(arguments[i]);
  }

  //create methods app.invite, app.register, etc..
  methods.forEach((method) => {
    app[method.toLowerCase()] = app.use.bind(app, method.toLowerCase()) ;
  }) ;

  //special handling for cdr events
  app.on = function(event, listener) {
    if (0 === event.indexOf('cdr:')) {
      if (app.client) {
        app.client.on(event, function() {
          var args = Array.prototype.slice.call(arguments) ;
          EventEmitter.prototype.emit.apply(app, [event].concat(args)) ;
        }) ;
      }
      else {
        this._cachedEvents.push(event) ;
      }
    }
    //delegate all others to standard EventEmitter prototype
    return EventEmitter.prototype.addListener.call(app, event, listener) ;
  } ;

  return app;
}
939830
@Deprecated
  private void emitJvmMemMetrics(ServiceEmitter emitter)
  {
    // I have no idea why, but jvm/mem is slightly more than the sum of jvm/pool. Let's just include
    // them both.
    final Map<String, MemoryUsage> usages = ImmutableMap.of(
        "heap", ManagementFactory.getMemoryMXBean().getHeapMemoryUsage(),
        "nonheap", ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage()
    );
    for (Map.Entry<String, MemoryUsage> entry : usages.entrySet()) {
      final String kind = entry.getKey();
      final MemoryUsage usage = entry.getValue();
      final ServiceMetricEvent.Builder builder = builder().setDimension("memKind", kind);
      MonitorUtils.addDimensionsToBuilder(builder, dimensions);

      emitter.emit(builder.build("jvm/mem/max", usage.getMax()));
      emitter.emit(builder.build("jvm/mem/committed", usage.getCommitted()));
      emitter.emit(builder.build("jvm/mem/used", usage.getUsed()));
      emitter.emit(builder.build("jvm/mem/init", usage.getInit()));
    }

    // jvm/pool
    for (MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) {
      final String kind = pool.getType() == MemoryType.HEAP ? "heap" : "nonheap";
      final MemoryUsage usage = pool.getUsage();
      final ServiceMetricEvent.Builder builder = builder()
          .setDimension("poolKind", kind)
          .setDimension("poolName", pool.getName());
      MonitorUtils.addDimensionsToBuilder(builder, dimensions);

      emitter.emit(builder.build("jvm/pool/max", usage.getMax()));
      emitter.emit(builder.build("jvm/pool/committed", usage.getCommitted()));
      emitter.emit(builder.build("jvm/pool/used", usage.getUsed()));
      emitter.emit(builder.build("jvm/pool/init", usage.getInit()));
    }
  }
343068
function ClientChannel(client, opts) {
  opts = opts || {};
  events.EventEmitter.call(this);

  this.client = client;
  this.timeout = utils.getOption(opts, 'timeout', client._timeout$);
  this._endWritable = !!utils.getOption(opts, 'endWritable', true);
  this._prefix = normalizedPrefix(opts.scope);

  var cache = client._cache$;
  var clientSvc = client._svc$;
  var hash = opts.serverHash;
  if (!hash) {
    hash = clientSvc.hash;
  }
  var adapter = cache[hash];
  if (!adapter) {
    // This might happen even if the server hash option was set if the cache
    // doesn't contain the corresponding adapter. In this case we fall back to
    // the client's protocol (as mandated by the spec).
    hash = clientSvc.hash;
    adapter = cache[hash] = new Adapter(clientSvc, clientSvc, hash);
  }
  this._adapter = adapter;

  this._registry = new Registry(this, PREFIX_LENGTH);
  this.pending = 0;
  this.destroyed = false;
  this.draining = false;
  this.once('_eot', function (pending, err) {
    // Since this listener is only run once, we will only forward an error if
    // it is present during the initial `destroy` call, which is OK.
    debug('client channel EOT');
    this.destroyed = true;
    this.emit('eot', pending, err);
  });
}
933016
function swsElasticEmitter() {

    // Options
    this.options = null;

    this.indexBuffer = '';
    this.bufferCount = 0;
    this.lastFlush = 0;

    this.elasticURL = null;
    this.elasticURLBulk = null;
    this.elasticProto = null;
    this.elasticHostname = null;
    this.elasticPort = null;

    this.indexPrefix = "api-";

    this.enabled = false;
}