Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AbstractDriver.php

function AbstractDriver::onReadable

Overrides Driver::onReadable

File

vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php, line 175

Class

AbstractDriver
Event loop driver which implements all basic operations to allow interoperability.

Namespace

Revolt\EventLoop\Internal

Code

public function onReadable(mixed $stream, \Closure $closure) : string {
    $streamCallback = new StreamReadableCallback($this->nextId++, $closure, $stream);
    $this->callbacks[$streamCallback->id] = $streamCallback;
    $this->enableQueue[$streamCallback->id] = $streamCallback;
    return $streamCallback->id;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal