Bind to *protocol* and start calling callbacks on it.
338077
def start(self, protocol):
        
        if self._protocol is not None:
            raise TransportError('already started')
        self._protocol = protocol
        self._protocol.connection_made(self)
        if self._readable:
            self.resume_reading()
        if self._writable:
            self._writing = True
            self._can_write.set()
524049
def bind(self, handler, argspec):
        
        self.handlers[argspec.key].append((handler, argspec))
114400
function(rpc_method, fn) {
        rpc.on(rpc_method, _.partial(moduleEventWrap, rpc_method, fn));
    }
815893
function bindCallbacks( o, callbacks, args ) {
		var prop = QUnit.objectType( o );
		if ( prop ) {
			if ( QUnit.objectType( callbacks[ prop ] ) === "function" ) {
				return callbacks[ prop ].apply( callbacks, args );
			} else {
				return callbacks[ prop ]; // or undefined
			}
		}
	}
551278
def set_server_callback(self, handle):
        
        if self.on_events:
            for event in self.on_events:
                handle.on_event(event, self.on_event)
        if self.on_changes:
            for change in self.on_changes:
                if change in ['patching', 'streaming']:
                    # Patch and stream events do not need handling on server
                    continue
                handle.on_change(change, self.on_change)
30119
def bind(self, callback):
        
        handlers = self._handlers
        if self._self is None:
            raise RuntimeError('%s already fired, cannot add callbacks' % self)
        if handlers is None:
            handlers = []
            self._handlers = handlers
        handlers.append(callback)
46661
function bindEvent ( namespacedEvent, callback ) {
            scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];
            scope_Events[namespacedEvent].push(callback);

            // If the event bound is 'update,' fire it immediately for all handles.
            if ( namespacedEvent.split('.')[0] === 'update' ) {
                scope_Handles.forEach(function(a, index){
                    fireEvent('update', index);
                });
            }
        }
813275
public void bind(ServerSocketBar ss)
    throws IOException
  {
    Objects.requireNonNull(ss);

    _isBind.set(true);

    if (_protocol == null)
      throw new IllegalStateException(L.l("'{0}' must have a configured protocol before starting.", this));

    if (_throttle == null)
      _throttle = new ThrottleSocket();

    _serverSocket = ss;

    String scheme = _protocol.name();

    if (_address != null)
      log.info(scheme + " listening to " + _address + ":" + _port);
    else
      log.info(scheme + " listening to *:" + _port);

    if (_sslFactory != null) {
      try {
        _serverSocket = _sslFactory.bind(_serverSocket);
      } catch (RuntimeException e) {
        throw e;
      } catch (IOException e) {
        throw e;
      } catch (Exception e) {
        throw new IOException(e);
      }
    }
  }
1256097
def _connect_callbacks(self):
        """"""
        figure = self.get_figure()
        callback = partial(mpl_redraw_callback, tax=self)
        event_names = ('resize_event', 'draw_event')
        for event_name in event_names:
            figure.canvas.mpl_connect(event_name, callback)
565598
def defer_callback(callback, *args, **kwargs):
    """"""
    start()
    global_server.ioloop.add_callback(lambda: callback(*args, **kwargs))
108082
def register_callback(self):
        """"""

        cid = str(self.__cid)
        self.__cid += 1
        event = queue.Queue()
        self.__callbacks[cid] = event
        return cid, event
1155363
def listen(cls, event, func):
        """"""
        signal(event).connect(func, sender=cls)
860675
def register_onRsp(self, req):
        
        def wrapper(_callback):
            callbackList = self._req_callbacks.setdefault(req, [])
            callbackList.append(_callback)
            return _callback
        return wrapper
285830
async def send(self, *args, **kwargs):
        """"""
        for callback in self:
            res = callback(*args, **kwargs)
            if asyncio.iscoroutine(res) or isinstance(res, asyncio.Future):
                await res
278341
def bind(self, event_name, callback, *args, **kwargs):
        
        self.event_callbacks[event_name].append((callback, args, kwargs))
585628
function callNew(T, args)
{
  return new (Function.prototype.bind.apply(T, [null].concat(args)));
}
1088624
function(options){
    this.triggerMethod("initialize:before", options);
    this._initCallbacks.run(options, this);
    this.triggerMethod("initialize:after", options);

    this.triggerMethod("start", options);
  }